[concurrency-interest] a question about concurrent safe access
yechielf at gigaspaces.com
Mon Sep 19 06:13:50 EDT 2005
say I have a pointer ( reference) to an object ( A). This reference is
changed to point at object B. I have threads that concurrently are using
that reference to get the object it points at. I dont want to synchronize
the usage of the reference. Is it safe to do so, i.e. if I dont use a lock
and I dont declare the reference volatile will I always get object A or B or
do I have a risk of getting "dirty" inconsistent pointer , i.e. is assigning
a pointer always atomic ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest