• 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: NSOperation and threadDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperation and threadDictionary


  • Subject: Re: NSOperation and threadDictionary
  • From: Rick Mann <email@hidden>
  • Date: Wed, 22 Sep 2010 17:03:58 -0700

On Sep 22, 2010, at 17:00:13, Roland King wrote:

>>
>> Seems reasonable. The only problem I foresee is that if the system is recycling threads for subsequent NSOperations, I don't think you'll get the NSThreadWillExitNotification, because the thread itself never exits.
>>
>
> Do you care? In my case I only care that the MOC is appropriate for the thread I'm on, I don't need it to be empty and brand new, if it's primed with data that's actually a bonus for me. If you do then you might want to add another method to the singleton to explictly destroy the MOC for your thread, and call it after you save data or just before the method you're running on the queue exits so the next guy will definitely get a fresh one.

For sure I care. I want a fresh MOC, and I wanted to avoid having new classes written having to make sure of this (many different engineers come and go on this project; the more stuff they have to keep track of or know, the more likely they are to introduce errors).

It can clearly be done, we just have an architecture with a bit of a hole because of the inability to "just use" the TLS.

--
Rick


_______________________________________________

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

References: 
 >NSOperation and threadDictionary (From: Rick Mann <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Julien Poissonnier <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Rick Mann <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Kyle Sluder <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Rick Mann <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Roland King <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Rick Mann <email@hidden>)
 >Re: NSOperation and threadDictionary (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSOperation and threadDictionary
  • Next by Date: Re: What's the point of @properties?
  • Previous by thread: Re: NSOperation and threadDictionary
  • Next by thread: Re: GC, plain C structs, and when to use __strong
  • Index(es):
    • Date
    • Thread