mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Java: Update qhelp as per review.
This commit is contained in:
@@ -68,9 +68,9 @@ variable can be used to avoid reading the field more times than neccessary.
|
||||
|
||||
<p>
|
||||
As a final note, it is possible to use double-checked locking correctly without
|
||||
<code>volatile</code> if the constructed object is immutable in the sense that
|
||||
all its fields are declared <code>final</code> and the double-checked field is
|
||||
read exactly once outside the synchronized block.
|
||||
<code>volatile</code> if the object you construct is immutable. That is, the
|
||||
object declares all fields as <code>final</code>, and the double-checked field
|
||||
is read exactly once outside the synchronized block.
|
||||
</p>
|
||||
<p>
|
||||
Given that all fields in <code>MyImmutableObject</code> are declared
|
||||
@@ -101,9 +101,11 @@ Java Language Specification:
|
||||
Wikipedia: <a href="https://en.wikipedia.org/wiki/Double-checked_locking">Double-checked locking</a>.
|
||||
</li>
|
||||
<li>
|
||||
Aleksey Shipilëv:
|
||||
<a href="https://shipilev.net/blog/2014/safe-public-construction/">Safe Publication and Safe Initialization in Java</a>.
|
||||
</li>
|
||||
<li>
|
||||
Aleksey Shipilëv:
|
||||
<a href="https://shipilev.net/blog/2016/close-encounters-of-jmm-kind/">Close Encounters of The Java Memory Model Kind</a>.
|
||||
</li>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user