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

Comparing jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java (file contents):
Revision 1.1 by dl, Sun Dec 28 21:56:18 2003 UTC vs.
Revision 1.2 by dl, Mon Dec 29 01:18:40 2003 UTC

# Line 61 | Line 61 | public class AbstractQueuedSynchronizerT
61          }
62          
63          private final Sync sync = new Sync();
64        public void lock() { sync.acquireExclusiveUninterruptibly(1);  }
64          public boolean tryLock() {
65              return sync.acquireExclusiveState(false, 1, null) >= 0;
66          }
67 +        public void lock() {
68 +            if (!tryLock()) sync.acquireExclusiveUninterruptibly(1);
69 +        }
70          public void lockInterruptibly() throws InterruptedException {
71              sync.acquireExclusiveInterruptibly(1);
72          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines