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.51 by jsr166, Thu Apr 20 07:20:10 2006 UTC vs.
Revision 1.52 by jsr166, Wed Aug 8 16:42:01 2007 UTC

# Line 212 | Line 212 | public class Semaphore implements java.i
212          }
213  
214          protected int tryAcquireShared(int acquires) {
215            Thread current = Thread.currentThread();
215              for (;;) {
216 <                Thread first = getFirstQueuedThread();
218 <                if (first != null && first != current)
216 >                if (hasQueuedPredecessors())
217                      return -1;
218                  int available = getState();
219                  int remaining = available - acquires;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines