At 11:42 AM -0800 11/24/08, [EMAIL PROTECTED] wrote:
No, it's not a general consensus. It's something I discovered on my
own, and posted about it here. I haven't received any overall
confirmation that it's broken, but my simple test project was able to
reliably crash on perhaps half a dozen different hardware
configurations. (And fail to crash on quite a few more.)

If you like, you can go through the original thread here and come to
your own conclusions:

http://www.cocoabuilder.com/archive/message/cocoa/2008/10/30/221452

If you want to know more about it, please feel free to ask me.

Michael, I read that original thread. The reason you are having problems is that you are misusing the NSOperation & NSOperationQueue system. Your test program crashes for me, reliably, just as you say, on a 4-Core Mac.

However, if instead of using 10 NSOperationQueues, you use a single global NSOperationQueue, the program stops crashing and becomes reliable.

If you want serialization, then use -[NSOperation addDependency:] that is what addDependency: is for.

Since the whole point of NSOperationQueue is to balance the mapping from cores to threads over the whole machine to get the best throughput for the end-user, for the end-user's mix of processes, it makes sense that Apple intended you to have a single NSOperationQueue per process.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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