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.76 by dl, Fri Nov 18 12:50:51 2016 UTC vs.
Revision 1.77 by jsr166, Wed Apr 19 23:45:51 2017 UTC

# Line 330 | Line 330 | public class Semaphore implements java.i
330       * This "barging" behavior can be useful in certain
331       * circumstances, even though it breaks fairness. If you want to honor
332       * the fairness setting, then use
333 <     * {@link #tryAcquire(long, TimeUnit) tryAcquire(0, TimeUnit.SECONDS) }
333 >     * {@link #tryAcquire(long, TimeUnit) tryAcquire(0, TimeUnit.SECONDS)}
334       * which is almost equivalent (it also detects interruption).
335       *
336       * @return {@code true} if a permit was acquired and {@code false}
# Line 494 | Line 494 | public class Semaphore implements java.i
494       * &quot;barging&quot; behavior can be useful in certain
495       * circumstances, even though it breaks fairness. If you want to
496       * honor the fairness setting, then use {@link #tryAcquire(int,
497 <     * long, TimeUnit) tryAcquire(permits, 0, TimeUnit.SECONDS) }
497 >     * long, TimeUnit) tryAcquire(permits, 0, TimeUnit.SECONDS)}
498       * which is almost equivalent (it also detects interruption).
499       *
500       * @param permits the number of permits to acquire

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines