Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added horizontal placeholder for navigation script

 

Reading a shared primitive variable in one thread may not yield the value of the most recent write to the variable from another thread. Consequently, the thread may observe a stale value of the shared variable. To ensure the visibility of the most recent update, either the variable must be declared volatile or the reads and writes must be synchronized.

...