[concurrency-interest] RE: Synchronization of data read by multiplethreads

Larry Riedel larryr at saturn.sdsu.edu
Sun Oct 30 19:54:11 EST 2005

> > [...] there will only ever be one thread aware of the existence of
> > an object before it has been completely constructed (assuming, of
> > course, the constructor does not give away references to itself),
> > and consequently no other thread will see any state the object was
> > in before its construction was complete. [...]
> If the thread doing the construction publishes the reference to the
> newly constructed object in an unsafe manner (ie without synchronization)
> then other threads accessing the object need not see the constructed state
> of its fields (unless they are final or volatile).

Would it be easy to provide an example which demonstrates
this (another thread seeing the inchoate state)?


More information about the Concurrency-interest mailing list