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="ef309c3dbf038108-7de320ed-4412486b-8939b732-7b5d0e12f2e9c18786720718"><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="4ddea48d856b835d-27a96a83-440f4e81-9ae1b51d-87732e8eb588cddbf3b9b6f7"><ac:plain-text-body><![CDATA[

[[Halloway 2000

AA. Bibliography#Halloway 00]]

 

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

...