JavaMemoryModel: From "Elements of Java Style"....

From: Jeremy Manson (
Date: Sat Jul 29 2000 - 00:15:41 EDT

> From "The Elements of Java Style", by Allan Vermeulen et al., page 84:
> #99. Use the double-check pattern for synchronized initialization.
> They give the standard, broken double-check idiom.
> This double-check idiom is like a roach infestation. It doesn't
> matter how many of them you crush under your shoe, more of them crawl
> out from under the refrigerator.

Lovely metaphor. Here are a couple of more references for it:

"Java 2 Performance and Idiom Guide", Craig Larman and Rhett Guthrie, p100
"Java in Practice: Design Styles and Idioms for Effective Java", Nigel
Warren and Philip Bishop, p142.

                                        Jeremy Manson
JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:27 EDT