Versions Compared

Key

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

...

Additionally, synchronization should be limited to cases where it is absolutely necessary. For example, the paint(), dispose(), stop(), and destroy() methods should never be synchronized in an applet because they are always called and used from dedicated threads. The Thread.stop() and Thread.destroy() methods are deprecated. For more information, see rule THI05-J. Do not use Thread.stop() to terminate threads.

This rule also applies to programs that need to work with a limited set of resources. For example, liveness issues can arise when two or more threads are waiting for each other to release resources such as database connections. These issues can be resolved by letting each waiting thread retry the operation at random intervals, until they succeed in acquiring the resource successfully.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="276e587a7c123a0b-052d36d5-4eed4f29-8ebb8b99-c646c418f700210674066c89"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[Chapter 17, Threads and Locks

http://java.sun.com/docs/books/jls/third_edition/html/memory.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ddb3694f9f632335-e0370ff2-42c44985-9f8cbebc-a79b1110d6dc86cca1032e77"><ac:plain-text-body><![CDATA[

[[Halloway 2000

AA. Bibliography#Halloway 00]]

 

]]></ac:plain-text-body></ac:structured-macro>

...