Re: NSOperation and threadDictionary
Re: NSOperation and threadDictionary
- Subject: Re: NSOperation and threadDictionary
- From: Roland King <email@hidden>
- Date: Thu, 23 Sep 2010 08:00:13 +0800
>
> 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.
_______________________________________________
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