On 9/3/13 1:23 PM, Jonathan Taylor wrote:
-       True thread safety would require a copy that represents an instantaneous
snapshot of the state of the entire object, i.e. copy not taken while object
is being updated. Actually, I suspect this last condition is not a problem
for my specific case, but best to be on the safe side, for several different
reasons.

That means you have to make the copy and write accesses to the individual properties mutually exclusive. Depending on the number of properties in your object, it might be easier to completely exchange the object whenever you want to mutate one if its properties, basically treating the whole object immutable. Copying is trivial then. Of course it depends on how many times a second you need to change properties.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to