Re: Saving NSDictionary, Enumeration error
Re: Saving NSDictionary, Enumeration error
- Subject: Re: Saving NSDictionary, Enumeration error
- From: Tamas Nagy <email@hidden>
- Date: Wed, 08 May 2013 07:11:07 +0200
Thanks Scott, good point. I'll modify the saveData method to collect the data on the background thread.
On May 7, 2013, at 11:39 PM, Scott Ribe <email@hidden> wrote:
> 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