commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: svn commit: r819141 - in /commons/proper/lang/trunk/src: java/org/apache/commons/lang/concurrent/LazyInitializer.java test/org/apache/commons/lang/concurrent/ test/org/apache/commons/lang/concurrent/LazyInitializerTest.java
Date Mon, 28 Sep 2009 08:07:24 GMT
sebb wrote:
> Where is that described? The first reference I found says that the
> local variable is a performance optimisation; it's the volatile
> keyword that makes it thread-safe:
> 
> http://technology.amis.nl/blog/4384/the-double-checked-locking-confusion
> also
> http://jeremymanson.blogspot.com/2008/05/double-checked-locking.html
> 
> But of course these could be wrong...

http://java.sun.com/developer/technicalArticles/Interviews/bloch_effective_08_qa.html

"The idiom is very fast but also complicated and delicate, so don't be 
tempted to modify it in any way"

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message