Re: Saving NSDictionary, Enumeration error
Re: Saving NSDictionary, Enumeration error
- Subject: Re: Saving NSDictionary, Enumeration error
- From: Scott Ribe <email@hidden>
- Date: Tue, 07 May 2013 15:39:17 -0600
On May 7, 2013, at 3:32 PM, Tamas Nagy wrote:
> so does not this made the dictionary already read-only?
And what happens when dict is modified by another thread during the call to dict copy?
You can't solve the problem by layering copy operation on top of copy operation. You have to synchronize access appropriately. Now, make the copy is a good idea, so that you only have to synchronize at that point, and after are free to modify the original while reading the copy.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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