[concurrency-interest] Significance of volatile for Objects

Larry Riedel larryr at saturn.sdsu.edu
Fri Mar 7 13:30:14 EST 2008

> volatile in this case doesn't guarantee the visibility[?]

I think intuitively a definition "volatile Map data;"
says the object referenced by "data" may get changed
by another thread, but it really just means another
thread may make "data" reference a different object,
and says nothing about changes to the object at all.
So invoking methods does nothing as far as visibility.

Kind of like in C++
   Map const * data;
   Map * const data;


More information about the Concurrency-interest mailing list