ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/TimeUnit.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/TimeUnit.java (file contents):
Revision 1.61 by jsr166, Sun Aug 20 23:47:06 2017 UTC vs.
Revision 1.62 by jsr166, Mon Aug 21 00:05:14 2017 UTC

# Line 313 | Line 313 | public enum TimeUnit {
313       * using:
314       *
315       * <pre> {@code
316 <     * public synchronized E poll(long timeout, TimeUnit unit)
316 >     * public E poll(long timeout, TimeUnit unit)
317       *     throws InterruptedException {
318 <     *   while (empty) {
319 <     *     unit.timedWait(this, timeout);
320 <     *     ...
318 >     *   synchronized (lock) {
319 >     *     while (isEmpty()) {
320 >     *       unit.timedWait(this, timeout);
321 >     *       ...
322 >     *     }
323       *   }
324       * }}</pre>
325       *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines