• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform) (From: 尹佳冀 <email@hidden>)
 >Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform) (From: Mike Abdullah <email@hidden>)
 >Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform) (From: 尹佳冀 <email@hidden>)
 >Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform) (From: Kyle Sluder <email@hidden>)
 >Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform) (From: "Glenn L. Austin" <email@hidden>)

  • Prev by Date: Re: Close box not showing as dirty when the doc says it's dirty
  • Next by Date: Re: Close box not showing as dirty when the doc says it's dirty
  • Previous by thread: Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
  • Next by thread: Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)
  • Index(es):
    • Date
    • Thread