Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed some typos

...

CON06-J. Do not defer a thread that is holding a lock

CON07-J. Multiple Ensure atomicity of calls to atomic functions are not themselves atomicthread-safe classes

CON08-J. Do not call alien methods that synchronize on the same object as any callers in the execution chain

...

Wiki Markup
If a happens-before relationship does not exist between two operations, the JVM is free to reorder them. A data race occurs when a variable is written to by at least one thread and read by a at least oneanother other thread, and the reads and writes are not ordered by a happens-before relationship.  A correctly synchronized program is one with no data races.  The Java Memory ModeModel guarantees _sequential consistency_ for correctly synchronized programs.  Sequential consistency means that the result of any execution is the same as if the reads and writes by all threads on shared data were executed in some sequential order and the operations of each individual thread appear in this sequence in the order specified by its program \[[Tanenbaum 03|AA. Java References#Tanenbaum 03]\]. In other words:

...