June 21, 2006

How little I know ;)

Writing about web page http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

I was having a technical chat with Rob Harrop of Interface21 fame and we got talking about java synchronisation and the farce that is double checked locking, both concepts I thought I had a handle on.

Anyways, I decided to do a bit more reading and am astounded at how much I don't know :) Admittedly I don't feel too bad about this because I have never explicitly looked at these in depth, but here are some interesting links:


I thought I knew quite a bit about java until I spoke to Rob :)

- 3 comments by 2 or more people Not publicly viewable

  1. Chris May

    ISTR reading somewhere that either Java 5 or 6 had fixed the memory model, to the point where a DCL implementation was now possible even on multiprocessor machines – did Rob refer to this at all?

    Personally, though, I've never come across a situation where synchronizing was both necessary and not performant enough – though I don't write frameworks so that's probably why

    21 Jun 2006, 13:30

  2. Chris May


    As of J2SE 5.0, this problem has been fixed. The volatile keyword now ensures that multiple threads handle the singleton instance correctly. This new idiom is described in

    21 Jun 2006, 13:37

  3. Yeah, I thought Java 5 had fixed it as well….. I almost certainly misunderstood Rob's point then :)

    21 Jun 2006, 13:44

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

June 2006

Mo Tu We Th Fr Sa Su
May |  Today  | Jul
         1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30      

Search this blog



Most recent comments

  • Interesting… While I'm not completely convinced in such microbenchmarks, I'm pretty sure that 1ms … by Alexander Snaps on this entry
  • Hello. I bought the book yesterday. I was trying to find the source code for chapter 11 and chapter … by Suleman on this entry
  • http://woosight.net/account/login?username=demo by live mashup demo on this entry
  • Thanks mate ….. This blog was really helpful. by Maaz Hurzuk on this entry
  • Ty. Not directly helpful for my problem, but pointed me in the right direction. You will also get th… by Mike E. on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder