[concurrency-interest] Propagation of signals tonon-interrupted thread

Martin Buchholz martinrb at google.com
Fri Nov 11 13:50:23 EST 2011


My latest spec proposal for ReentrantLock, with stronger disclaimer:

--- java/util/concurrent/locks/ReentrantLock.java 9 Jun 2011 07:48:44 -0000
1.96
+++ java/util/concurrent/locks/ReentrantLock.java 11 Nov 2011 18:41:22 -0000
@@ -467,6 +467,13 @@
      * but for <em>fair</em> locks favors those threads that have been
      * waiting the longest.
      *
+     * <li>None of the condition {@linkplain Condition#await() waiting}
+     * methods ever return due to a "<em>spurious wakeup</em>".
+     * However, as explained in the {@link Condition} documentation,
+     * application programs should almost never rely on this guarantee.
+     * A {@code Condition} should generally be waited upon in a loop,
+     * testing the state predicate that is being waited for.
+     *
      * </ul>
      *
      * @return the Condition object
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20111111/3e6f1126/attachment.html>


More information about the Concurrency-interest mailing list