ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Semaphore.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/Semaphore.java (file contents):
Revision 1.34 by dl, Wed Jan 7 01:00:51 2004 UTC vs.
Revision 1.35 by dl, Thu Jan 8 01:28:48 2004 UTC

# Line 197 | Line 197 | public class Semaphore implements java.i
197          protected int tryAcquireShared(int acquires) {
198              Thread current = Thread.currentThread();
199              for (;;) {
200 <                if (!isFirst(current))
200 >                Thread first = getFirstQueuedThread();
201 >                if (first != null && first != current)
202                      return -1;
203                  int available = getState();
204                  int remaining = available - acquires;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines