> On May 6, 2016, at 2:34 PM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> On May 6, 2016, at 13:32 , Carl Hoefs <newsli...@autonomy.caltech.edu 
> <mailto:newsli...@autonomy.caltech.edu>> wrote:
>> 
>> Once in a while, NSOperationQueue -addOperation: throws an exception. I 
>> guess this is a well-known bug going all the way back to 2008. I found Mike 
>> Ash's writeup on the issue, and have downloaded his replacement class, 
>> RAOperationQueue. However, it was written long ago for GC not ARC.
> 
> As a side issue, you didn’t give us any explicit references to Mike’s 
> discussion, but looking back through his blog 
> (mikeash.com/pyblog/use-nsoperationqueue.html 
> <http://mikeash.com/pyblog/use-nsoperationqueue.html>), I see that he 
> reported that *his* problem was fixed in 10.5.7:
> 
>> "Mac OS X 10.5.7 has shipped and includes a fix for the NSOperationQueue bug 
>> that I discovered late last year. I have run all of my old test cases 
>> against 10.5.7 and it appears to perform as advertised. As far as I can see, 
>> NSOperationQueue is now safe to use.”
> 
> 
> These days, if I had any doubts about NSOperationQueue, I’d switch to using 
> GCD directly. There’s very little that NSOperationQueue does that GCD 
> doesn’t, and I must admit I’ve never regarded NSOperationQueue as superior**, 
> apart from the fact that it got here first. (IIRC) NSOperationQueue started 
> to displace raw threading only just before GCD arrived on the scene.

I've noticed infrequent objcExceptionThrow()s using NSOperationQueue for quite 
a while now, always thinking it must be something I'm doing. Unfortunately, the 
exception appears so seldom that I've never had the time to look into the issue 
at the time it happens. All I'm doing is -addOperation: when it blows. I can't 
reproduce it at will. I should have taken a stack trace when it occurred today. 

Sadly, RAOperationQueue et al is suffering from code rot. I couldn't get it to 
work at all. Thanks for the GCD suggestion as an alternative, I'll go with it. 
(It isn't that NSOperationQueue is superior to GCD or not, it was just a very 
conveniently-oriented object to use.)
-Carl

_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to