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.66 by dl, Tue Dec 23 13:33:52 2014 UTC vs.
Revision 1.67 by dl, Tue Dec 23 13:39:21 2014 UTC

# Line 114 | Line 114 | import java.util.concurrent.locks.Abstra
114   * #acquire(int) acquire} and {@link #release(int) release} multiple
115   * permits at a time. These methods are generally more efficient and
116   * effective than loops. However, they do not establish any preference
117 < * order. For example, if thread A invokes @code{s.acquire(3}) and
118 < * thread B invokes @code{s.acquire(2)}, and two permits become
117 > * order. For example, if thread A invokes {@code s.acquire(3}) and
118 > * thread B invokes {@code s.acquire(2)}, and two permits become
119   * available, then there is no guarantee that thread B will obtain
120 < * them unless its acquire came first and Semaphore @code{s} is in
120 > * them unless its acquire came first and Semaphore {@code s} is in
121   * fair mode.
122   *
123   * <p>Memory consistency effects: Actions in a thread prior to calling
# Line 410 | Line 410 | public class Semaphore implements java.i
410       * <p>Acquires the given number of permits, if they are available,
411       * and returns immediately, reducing the number of available permits
412       * by the given amount. This method has the same effect as the
413 <     * loop @code{for (int i = 0; i < permits; ++i) acquire();} except
413 >     * loop {@code for (int i = 0; i < permits; ++i) acquire();} except
414       * that it atomically acquires the permits all at once:
415       *
416       * <p>If insufficient permits are available then the current thread becomes
# Line 452 | Line 452 | public class Semaphore implements java.i
452       * <p>Acquires the given number of permits, if they are available,
453       * and returns immediately, reducing the number of available permits
454       * by the given amount.This method has the same effect as the
455 <     * loop @code{for (int i = 0; i < permits; ++i) acquireUninterruptibly();}
455 >     * loop {@code for (int i = 0; i < permits; ++i) acquireUninterruptibly();}
456       * except that it atomically acquires the permits all at once:
457       *
458       * <p>If insufficient permits are available then the current thread becomes

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines