Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
The first condition can be relaxed when you can be sure that only one thread will ever update the value of the variable \[[Goetz 2006|AA. Java References#GoetzBibliography#Goetz 06]\]. However, code that relies on a single-thread confinement is error-prone and difficult to maintain. This behavior is permissible under this guideline but not recommended.

...

Wiki Markup
\[[JLS 2005|AA. Java References#JLSBibliography#JLS 05]\] [Chapter 17, Threads and Locks|http://java.sun.com/docs/books/jls/third_edition/html/memory.html], Section 17.4.5 Happens-Before Order, Section 17.4.3 Programs and Program Order, Section 17.4.8 Executions and Causality Requirements
\[[Bloch 2008|AA. Java References#BlochBibliography#Bloch 08]\] Item 66: Synchronize access to shared mutable data
\[[Goetz 2006|AA. Java References#GoetzBibliography#Goetz 06]\] 3.4.2. "Example: Using Volatile to Publish Immutable Objects"
\[[JPL 2006|AA. Java References#JPLBibliography#JPL 06]\] 14.10.3. "The Happens-Before Relationship"
\[[MITRE 2009|AA. Java References#MITREBibliography#MITRE 09]\] [CWE ID 667|http://cwe.mitre.org/data/definitions/667.html] "Insufficient Locking," [CWE ID 413|http://cwe.mitre.org/data/definitions/413.html] "Insufficient Resource Locking," [CWE ID 567|http://cwe.mitre.org/data/definitions/567.html]  "Unsynchronized Access to Shared Data"

...