Re: Accessing array in thread safe way
Re: Accessing array in thread safe way
- Subject: Re: Accessing array in thread safe way
- From: Charles Srstka <email@hidden>
- Date: Thu, 08 Mar 2012 17:15:15 -0600
On Mar 8, 2012, at 4:57 PM, Quincey Morris wrote:
> It wouldn't solve, e.g., the possibly inconsistency between 'array.count' and a subsequent reference, unless it was coded to keep a "consistent" local reference to the copy of the array, in which case you'd want the copy to be explicit in the API so that a reader of the code would be aware, and that would be a non-atomic-level approach anyway.
If the array that the client is using is an immutable array that was created by copying the object’s internal NSMutableArray, then array.count is not going to change.
Charles
_______________________________________________
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