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.65 by dl, Tue Dec 23 11:58:00 2014 UTC vs.
Revision 1.66 by dl, Tue Dec 23 13:33:52 2014 UTC

# Line 409 | Line 409 | public class Semaphore implements java.i
409       *
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.
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
414 >     * that it atomically acquires the permits all at once:
415       *
416       * <p>If insufficient permits are available then the current thread becomes
417       * disabled for thread scheduling purposes and lies dormant until
# Line 449 | Line 451 | public class Semaphore implements java.i
451       *
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.
454 >     * by the given amount.This method has the same effect as the
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
459       * disabled for thread scheduling purposes and lies dormant until

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines