[concurrency-interest] Double Checked Locking in OpenJDK

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 13 03:41:49 EDT 2012


On 13/08/2012 05:38, Ruslan Cheremin wrote:
> :
>
>  From other side, File.toPath javadoc explicitly says what "returned
> instance must be the same for every invocation", so sync block is
> required here for mutual exclusion on initialization phase.
>
Yes, the actual wording is " Subsequent invocations of this method 
return the same Path" so hopefully this explains why it was implemented 
this way.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120813/d3010f79/attachment.html>


More information about the Concurrency-interest mailing list