61 |
|
public boolean isSignalled() { return getState() != 0; } |
62 |
|
|
63 |
|
public long tryAcquireShared(long ignore) { |
64 |
< |
return isSignalled()? 1 : -1; |
64 |
> |
return isSignalled() ? 1 : -1; |
65 |
|
} |
66 |
|
|
67 |
|
public boolean tryReleaseShared(long ignore) { |
953 |
|
/** |
954 |
|
* acquireSharedTimed returns after release |
955 |
|
*/ |
956 |
< |
public void testAsquireSharedTimed() throws InterruptedException { |
956 |
> |
public void testAcquireSharedTimed() throws InterruptedException { |
957 |
|
final BooleanLatch l = new BooleanLatch(); |
958 |
|
|
959 |
|
Thread t = new Thread(new CheckedRunnable() { |