# | Line 140 | Line 140 | public class Semaphore implements java.i | |
---|---|---|
140 | ||
141 | public int tryAcquireShared(boolean isQueued, int acquires) { | |
142 | for (;;) { | |
143 | < | if (!isQueued && fair && hasContended()) |
143 | > | if (!isQueued && fair && hasQueuedThreads()) |
144 | return -1; | |
145 | int available = getState(); | |
146 | int remaining = available - acquires; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |