Re: NSOperationQueue bug with leopard 10.5.6?
Re: NSOperationQueue bug with leopard 10.5.6?
- Subject: Re: NSOperationQueue bug with leopard 10.5.6?
- From: Michael Ash <email@hidden>
- Date: Mon, 2 Feb 2009 14:08:20 -0500
On Mon, Feb 2, 2009 at 1:59 PM, Barry Wark <email@hidden> wrote:
> First of all, thank you for shedding light on this bug; we're all
> benefiting from your investigations.
Thank you very much for saying so, it's much appreciated.
> Is this still the case if all operations are added on the main thread
> (i.e. even if they are added to multiple queues)?
Yep! Check out this update:
http://www.mikeash.com/?page=pyblog/dont-use-nsoperationqueue.html#comment-92c5b275246162678df037125f3ff3a7
Bottom line: that sample code uses a single NSOperationQueue, only
adds operations from the main thread, and does absolutely no funny
business whatsoever. Still crashes reliably and repeatedly.
At this point it seems that your choices are either to accept that
your code may have a roughly one in a million chance of crashing for
each NSOperation you enqueue, or avoid using NSOperationQueue. (Or
hope Apple fixes it before you ship, I suppose.)
Here's hoping Apple decides to fix it for 10.5. It would be
unfortunate to have this otherwise very nice API remain broken for an
entire major OS cycle.
If this affects you, please file a bug with Apple. The more people who
file bugs, the greater the chance that something will be done. If you
do, please feel free to reuse my test case (and actually trying it
first would be a good idea too), and if you like you can reference my
original bug which is rdar://6332143 .
Mike
_______________________________________________
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