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: Sat, 31 Jan 2009 00:27:09 -0500
On Fri, Jan 30, 2009 at 11:25 PM, Nick Zitzmann <email@hidden> wrote:
>
> On Jan 30, 2009, at 6:32 PM, email@hidden wrote:
>
>> I attempted to use NSOperationQueue with NSInvocationOperations and after
>> several frustrating days found multiple websights saying NSOperationQueue
>> has a bug with Leopard 10.5, that will be fixed with 10.6.
>>
>> Q1: does anyone know when 10.6 is scheduled for release?
>
> No, we don't.
The rule for nearly *any* unreleased apple product is: those who know
can't say, and those who can say don't know.
>> Q2: is there in fact a bug with 10.5 and NSOperationQueue?
>
>
> Yes, there is, but the likelihood that you'll trigger it is very, very low
> unless you have operations that are adding other operations (that are adding
> other operations, ...). If you don't, then there is nothing to worry about.
> If you do, then the workaround is to enqueue all operations in the main
> thread only.
That is not the case. As far as I've been able to determine, the
probability for causing a crash remains the same no matter where or
how you add your operations, as long as there are at least two active
queues in your application. All that matters for triggering the bug is
the existence of multiple queues and the frequency with which you
enqueue new operations. The probability is *roughly* (as in, I would
not count on my estimate to be closer than an order of magnitude, if
that) one in a million that any given operation will crash your
program. If you're comfortable with those odds then go for it. Or if
you can create only a single queue in your program and are confident
that nobody else is going to create a second one in your process
before Apple fixes the bug then go for it.
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