# | Line 136 | Line 136 | public class CountDownLatch { | |
---|---|---|
136 | return getState(); | |
137 | } | |
138 | ||
139 | < | public int tryAcquireSharedState(boolean isQueued, int acquires) { |
139 | > | public int tryAcquireShared(boolean isQueued, int acquires) { |
140 | return getState() == 0? 1 : -1; | |
141 | } | |
142 | ||
143 | < | public boolean releaseSharedState(int releases) { |
143 | > | public boolean tryReleaseShared(int releases) { |
144 | // Decrement count; signal when transition to zero | |
145 | for (;;) { | |
146 | int c = getState(); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |