PlanetJava
Custom Search

java-restlet-devel
[Top] [All Lists]

Concurrency problem with the double check locking pattern

Subject: Concurrency problem with the double check locking pattern
Date: Fri, 25 Sep 2009 12:30:13 +0200
Hi guys,
Ivan Gorgiev came across a subtle multi-threading issue as described here:
"Synchronization issues with Template"
http://restlet.tigris.org/issues/show_bug.cgi?id=881
It appears that the "double-check locking" pattern that we use in many
places in Restlet code doesn't work reliably in some environments (AMD-64 in
his case).
He further points to this web page which worries me:
"The "Double-Checked Locking is Broken" Declaration"
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
I'd like to get the opinion of concurrency experts in this list to see if we
better synchronize all those lazy creation methods instead?
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/>
http://www.noelios.com
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2400179
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy