• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Receiver type for instance message is a forward declaration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiver type for instance message is a forward declaration


  • Subject: Re: Receiver type for instance message is a forward declaration
  • From: Carl Hoefs <email@hidden>
  • Date: Fri, 06 May 2016 15:45:26 -0700

> On May 6, 2016, at 2:34 PM, Quincey Morris <email@hidden> wrote:
>
> On May 6, 2016, at 13:32 , Carl Hoefs <email@hidden <mailto:email@hidden>> 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 (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


  • Follow-Ups:
    • Re: Receiver type for instance message is a forward declaration
      • From: Carl Hoefs <email@hidden>
References: 
 >Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Receiver type for instance message is a forward declaration
  • Next by Date: Re: Receiver type for instance message is a forward declaration
  • Previous by thread: Re: Receiver type for instance message is a forward declaration
  • Next by thread: Re: Receiver type for instance message is a forward declaration
  • Index(es):
    • Date
    • Thread