Versions Compared

Key

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

...

Code Block
bgColor#ccccff
public synchronized void doSomething(long timeout)
  throws InterruptedException {

  while (<condition does not hold>) {
    wait(timeout); // Immediately leavesreleases current monitor
  }
}

The current object's monitor is immediately released upon entering the wait state. After the time out period has elapsed, the thread resumes execution after reacquiring the current object's monitor.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8c4d8b49378c4ae9-62f3d034-47314bc7-87f78f71-711c92370555de145fe4cfea"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

Class Object

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0b2cd58ebbd5d885-5f73c207-4f864e99-ab52ab0d-fcbc2aee85aee17951e8dacf"><ac:plain-text-body><![CDATA[

[[Grosso 2001

AA. Bibliography#Grosso 01]]

[Chapter 10: Serialization

http://oreilly.com/catalog/javarmi/chapter/ch10.html]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="14192bace0dc85ec-123d5e09-47ad4688-8952b0eb-a1b99eae889a2bfe54beb772"><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="a36a748490d3b49c-b67aba06-4e264c07-9059a0df-87580374e20e6c07c1009788"><ac:plain-text-body><![CDATA[

[[Rotem 2008

AA. Bibliography#Rotem 08]]

[Falacies of Distributed Computing Explained

http://www.rgoarchitects.com/Files/fallacies.pdf]

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

...