[cvs] / jsr166 / src / test / tck / AbstractQueuedSynchronizerTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Sun Dec 28 21:56:18 2003 UTC revision 1.2, Mon Dec 29 01:18:40 2003 UTC
# Line 61  Line 61 
61          }          }
62    
63          private final Sync sync = new Sync();          private final Sync sync = new Sync();
         public void lock() { sync.acquireExclusiveUninterruptibly(1);  }  
64          public boolean tryLock() {          public boolean tryLock() {
65              return sync.acquireExclusiveState(false, 1, null) >= 0;              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 {          public void lockInterruptibly() throws InterruptedException {
71              sync.acquireExclusiveInterruptibly(1);              sync.acquireExclusiveInterruptibly(1);
72          }          }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8