Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
- Subject: Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
- From: Steve Sisak <email@hidden>
- Date: Tue, 05 Feb 2013 20:24:53 -0500
At 8:13 AM -0800 2/5/13, Glenn L. Austin wrote:
I understand the *reasoning* behind
performSelector:withObject:afterDelay:, but I've banned that from
code I work on.
In the OP's case, I think he just needs to perform the selector
asynchronously so he doesn't deadlock -- waitUntilDone:NO ought to be
sufficient.
I agree on "magic numbers", but needing to be async is a classic
threading "gotcha".
BTW, performSelector:withObject:afterDelay: makes total sense for
retry logic in order to avoid hogging resources.
-Steve
_______________________________________________
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