Re: Threads and Locking Question
Re: Threads and Locking Question
- Subject: Re: Threads and Locking Question
- From: Ken Thomases <email@hidden>
- Date: Thu, 10 May 2012 16:55:03 -0500
On May 10, 2012, at 4:44 PM, Dave wrote:
> Thanks for that I will try it out tomorrow, as an aside, is this ok/recommended?
>
> -(void) someMethod:(NSString*) theParameter
> {
> if ([NSThread isMainThread)
> {
> [self performSelectorInBackground:@selector(someMethod:) withObject:self];
Presumably, you mean "withObject:theParameter".
> return;
> }
>
> // Do work
>
> }
As to whether it's OK/recommended, that depends. Why are you doing this? The caller of that method may be very surprised if it's asynchronous.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden