<?xml version="1.0" encoding="UTF-8"?>











<rss version="2.0" xmlns:jf="http://www.jivesoftware.com/xmlns/jiveforums/rss">



<channel>
    <title>Support Forums: Message List - Double Checked Locking Solutions</title>
    <link>http://www.theserverside.com</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    
        <generator>Jive Forums Silver 5.5.30 (www.jivesoftware.com)</generator>
    
    <pubDate>Sun, 19 May 2013 22:58:39 -0400</pubDate>


    <item>

        <title>Double checked locking fixed in JSR-133 Memory Model</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[This thread is old by now, but hope it's still active because question about "Not only has brief synchronization gotten a LOT less expensive since the Java 1.0 days, but under the new memory model, the performance cost of using volatile goes up, almost...]]></description>
        

        <pubDate>Sat, 13 Dec 2008 14:34:18 -0500</pubDate>

        

        <jf:creationDate>Sat, 13 Dec 2008 14:34:18 -0500</jf:creationDate>
        <jf:modificationDate>Sat, 13 Dec 2008 14:34:18 -0500</jf:modificationDate>
        <jf:date>Dec 13, 2008</jf:date>
        <jf:author>Samuel Branch</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Double checked locking fixed in JSR-133 Memory Model</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Apparently the double checked locking is fixed in the new memory model. What is suggested below however leads me to question the performance improvement gained through something like ConcurrentHashMap which uses a volatile check in place of...]]></description>
        

        <pubDate>Wed, 12 Apr 2006 13:24:15 -0400</pubDate>

        

        <jf:creationDate>Wed, 12 Apr 2006 13:24:15 -0400</jf:creationDate>
        <jf:modificationDate>Wed, 12 Apr 2006 13:24:15 -0400</jf:modificationDate>
        <jf:date>Apr 12, 2006</jf:date>
        <jf:author>Jason Weinstein</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>All this to get rid of some synchronization</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Well thanks for your comments.<br><br>A coworker suggested using copy on write, but the source for CopyOnWriteArrayList uses synchronization in its reads.<br><br>As you hinted i did take a look at the ConcurrentHashMap, the source! It turns out i don't...]]></description>
        

        <pubDate>Wed, 12 Apr 2006 02:46:10 -0400</pubDate>

        

        <jf:creationDate>Wed, 12 Apr 2006 02:46:10 -0400</jf:creationDate>
        <jf:modificationDate>Wed, 12 Apr 2006 02:46:10 -0400</jf:modificationDate>
        <jf:date>Apr 12, 2006</jf:date>
        <jf:author>Jason Weinstein</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>RE: an optimization and get a divide by zero</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[<blockquote>I'd like to think that there is a solution, or that in some case the compiler cannot do the optimization.</blockquote><br>I'm not really an expert on how the VM may optimize these things or when the cache must be flushed.  Personally, I don't...]]></description>
        

        <pubDate>Tue, 11 Apr 2006 09:31:51 -0400</pubDate>

        

        <jf:creationDate>Tue, 11 Apr 2006 09:31:51 -0400</jf:creationDate>
        <jf:modificationDate>Tue, 11 Apr 2006 09:31:51 -0400</jf:modificationDate>
        <jf:date>Apr 11, 2006</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>an optimization and get a divide by zero</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Thank you for your reply. I am quite familiar with the concurrent classes even prior to their inclusion in java5.<br><br>Now is it not possible to force the correct state somehow?<br><br>private Object obj = null;<br><br>public Object getObject()...]]></description>
        

        <pubDate>Mon, 10 Apr 2006 21:04:32 -0400</pubDate>

        

        <jf:creationDate>Mon, 10 Apr 2006 21:04:32 -0400</jf:creationDate>
        <jf:modificationDate>Mon, 10 Apr 2006 21:04:32 -0400</jf:modificationDate>
        <jf:date>Apr 10, 2006</jf:date>
        <jf:author>Jason Weinstein</jf:author>
        <jf:replyCount>4</jf:replyCount>
    </item>


    <item>

        <title>flushing</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[<blockquote>I really would like to know that a compiler can optimize this code to make it not work.</blockquote><br>I's the same as the dobule-checked locking version.  The Object reference could be non-null before it is fully created. When the thread...]]></description>
        

        <pubDate>Mon, 10 Apr 2006 09:46:06 -0400</pubDate>

        

        <jf:creationDate>Mon, 10 Apr 2006 09:46:06 -0400</jf:creationDate>
        <jf:modificationDate>Mon, 10 Apr 2006 09:46:06 -0400</jf:modificationDate>
        <jf:date>Apr 10, 2006</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>5</jf:replyCount>
    </item>


    <item>

        <title>Voliate pre-1.5</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Just a note.  Volatile does not guarantee what it should (and what you expect) in pre-1.5 jvms.  For this reason (among others) these are all suspect on a pre-1.5 JVM.]]></description>
        

        <pubDate>Mon, 10 Apr 2006 09:37:34 -0400</pubDate>

        

        <jf:creationDate>Mon, 10 Apr 2006 09:37:34 -0400</jf:creationDate>
        <jf:modificationDate>Mon, 10 Apr 2006 09:37:34 -0400</jf:modificationDate>
        <jf:date>Apr 10, 2006</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Ok, you have my time</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[These are very good catches. I appreciate them very much. I do have one question though, as this is really the only one that needs to work and you did not comment on it.<br><br>This is the correct way.<br><br>private Object obj = null;<br><br>public...]]></description>
        

        <pubDate>Fri, 07 Apr 2006 15:03:53 -0400</pubDate>

        

        <jf:creationDate>Fri, 07 Apr 2006 15:03:53 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 07 Apr 2006 15:03:53 -0400</jf:modificationDate>
        <jf:date>Apr 7, 2006</jf:date>
        <jf:author>Jason Weinstein</jf:author>
        <jf:replyCount>7</jf:replyCount>
    </item>


    <item>

        <title>Ok, you have my time</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[I spend some time looking at your code and foung one of the points which you missed. Look, this is your code:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;public final Object getObject() throws Exception...]]></description>
        

        <pubDate>Fri, 07 Apr 2006 07:56:23 -0400</pubDate>

        

        <jf:creationDate>Fri, 07 Apr 2006 07:56:23 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 07 Apr 2006 07:56:23 -0400</jf:modificationDate>
        <jf:date>Apr 7, 2006</jf:date>
        <jf:author>Sergey Vladimirov</jf:author>
        <jf:replyCount>8</jf:replyCount>
    </item>


    <item>

        <title>fixes will not work: there are more subtle reasons why</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Jason,<br><br>I will just quote one part from background link.<br><br>&quot;It doesn't work<br>There are lots of reasons it doesn't work. The first couple of reasons we'll describe are more obvious. After understanding those, you may be tempted to try to...]]></description>
        

        <pubDate>Fri, 07 Apr 2006 07:35:59 -0400</pubDate>

        

        <jf:creationDate>Fri, 07 Apr 2006 07:35:59 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 07 Apr 2006 07:35:59 -0400</jf:modificationDate>
        <jf:date>Apr 7, 2006</jf:date>
        <jf:author>Sergey Vladimirov</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Double Checked Locking Solutions</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39606</link>

        

        
            <description><![CDATA[Background.<br><br><a href="http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html" target="_blank">http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html</a><br><br>Introduction.<br><br>In a highly concurrent application...]]></description>
        

        <pubDate>Fri, 24 Mar 2006 18:32:18 -0500</pubDate>

        

        <jf:creationDate>Fri, 24 Mar 2006 18:32:18 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 24 Mar 2006 18:32:18 -0500</jf:modificationDate>
        <jf:date>Mar 24, 2006</jf:date>
        <jf:author>Jason Weinstein</jf:author>
        <jf:replyCount>10</jf:replyCount>
    </item>



</channel>
</rss>

