|
|
|
|
|
by layer8
1356 days ago
|
|
> I’m not talking about data races. Data races are typically bugs, by definition. One notable exception is the Racy Single-Check Idiom: http://javaagile.blogspot.com/2013/05/the-racy-single-check-... It is particularly suitable for lazy initialization in code that is typically (but not necessarily) executed single-threaded, and is famously used in Java’s String.hashCode() implementation. |
|