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: Barry Wark <email@hidden>
- Date: Mon, 2 Feb 2009 10:59:53 -0800
On Fri, Jan 30, 2009 at 9:27 PM, Michael Ash <email@hidden> wrote:
> 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.
First of all, thank you for shedding light on this bug; we're all
benefiting from your investigations.
Is this still the case if all operations are added on the main thread
(i.e. even if they are added to multiple queues)?
-Barry
>
> 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
>
_______________________________________________
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