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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to