ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/CancelledLockLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/CancelledLockLoops.java (file contents):
Revision 1.1 by dl, Mon May 2 19:19:38 2005 UTC vs.
Revision 1.3 by jsr166, Thu Jan 22 19:39:18 2009 UTC

# Line 1 | Line 1
1   /*
2 * @test
3 * @summary tests lockInterruptibly
4 * Checks for responsiveness of locks to interrupts. Runs under that
5 * assumption that ITERS_VALUE computations require more than TIMEOUT
6 * msecs to complete.
7 */
8 /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3 < * Expert Group and released to the public domain. Use, modify, and
4 < * redistribute this code in any way without acknowledgement.
3 > * Expert Group and released to the public domain, as explained at
4 > * http://creativecommons.org/licenses/publicdomain
5   */
6  
7   import java.util.concurrent.*;
# Line 83 | Line 76 | public final class CancelledLockLoops {
76              finally {
77                  lock.unlock();
78              }
79 <            if (completed != 2)
79 >            if (c != 2)
80                  throw new Error("Completed != 2");
81              int r = result;
82              if (r == 0) // avoid overoptimization

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines