• 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: Sublclassing NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sublclassing NSThread


  • Subject: Re: Sublclassing NSThread
  • From: Frédéric Testuz <email@hidden>
  • Date: Wed, 17 Dec 2008 18:29:07 +0100


Le 17 déc. 08 à 17:14, Keith Duncan a écrit :


On 17 Dec 2008, at 15:41, Jean-Daniel Dupas wrote:

because there's absolutely no way to guarantee that only a single NSOperationQueue
exists in your process

Couldn't you swizzle +[NSOperationQueue alloc] to return a singleton? Sure it's a hack, but a simple one that can be #ifdefed out for post Leopard builds. And would fix the problem for now if you've already architected a project around operation queues.

And -waitUntilAllOperationsAreFinished became useless : one of your thread create an operation queue and add some operations then wait for them to finish. But meanwhile another thread, perhaps in a frameeork you dont control, create also an operation queue and add some operations. Because of the singleton, your thread can wait a long time to continue.


Frédéric_______________________________________________

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: 
 >Sublclassing NSThread (From: Brad O'Hearne <email@hidden>)
 >Re: Sublclassing NSThread (From: "Shawn Erickson" <email@hidden>)
 >Re: Sublclassing NSThread (From: "Bradley S. O'Hearne" <email@hidden>)
 >Re: Sublclassing NSThread (From: "Michael Ash" <email@hidden>)
 >Re: Sublclassing NSThread (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Sublclassing NSThread (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Sublclassing NSThread (From: "Michael Ash" <email@hidden>)
 >Re: Sublclassing NSThread (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Sublclassing NSThread (From: Keith Duncan <email@hidden>)

  • Prev by Date: Get notified of fullscreen switch
  • Next by Date: Re: NSTimer help
  • Previous by thread: Re: Sublclassing NSThread
  • Next by thread: Re: Sublclassing NSThread
  • Index(es):
    • Date
    • Thread