...
Wiki Markup |
---|
This compliant solution uses the {{signalAll()}} method to notify all waiting threads. Before {{await()}} returns, the current thread reacquires the lock associated with this condition. When the thread returns, it is guaranteed to hold this lock \[[API 2006|AA. JavaBibliography#API References#API 06]\] The thread that is ready can perform its task, while all the threads whose condition predicates are false resume waiting. |
...
Wiki Markup |
---|
\[[API 2006|AA. JavaBibliography#API References#API 06]\] {{java.util.concurrent.locks.Condition}} interface \[[JLS 2005|AA. Java References#JLSBibliography#JLS 05]\] [Chapter 17, Threads and Locks|http://java.sun.com/docs/books/jls/third_edition/html/memory.html] \[[Goetz 2006|AA. Java References#GoetzBibliography#Goetz 06]\] Section 14.2.4, Notification \[[Bloch 2001|AA. Java References#BlochBibliography#Bloch 01]\] Item 50: Never invoke wait outside a loop |
...