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="d69fb34f597ee166-e0b79ff1-46824d1a-a5658d90-10d926ef210382206df23fdf"><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="a77868cd48024f83-0e108f5f-43924c54-98548629-aa9fabc2183cf85c8e7b0c90"><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="a83ba1a48ce68f1f-76dcb6f3-4b2a4eae-a4889774-4ecc7c9579fcf774391cf382"><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="7a5b1501a2bbfa2b-a41ac26a-4674416f-ab89a90d-751bf9170f989b1c32b549d4"><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>

...