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.40 by dl, Mon Feb 9 00:23:55 2004 UTC vs.
Revision 1.41 by dl, Mon Feb 9 13:28:48 2004 UTC

# Line 211 | Line 211 | public class Semaphore implements java.i
211      }
212  
213      /**
214 <     * Construct a <tt>Semaphore</tt> with the given number of
214 >     * Creates a <tt>Semaphore</tt> with the given number of
215       * permits and nonfair fairness setting.
216       * @param permits the initial number of permits available. This
217       * value may be negative, in which case releases must
# Line 222 | Line 222 | public class Semaphore implements java.i
222      }
223  
224      /**
225 <     * Construct a <tt>Semaphore</tt> with the given number of
225 >     * Creates a <tt>Semaphore</tt> with the given number of
226       * permits and the given fairness setting.
227       * @param permits the initial number of permits available. This
228       * value may be negative, in which case releases must
# Line 455 | Line 455 | public class Semaphore implements java.i
455      /**
456       * Acquires the given number of permits from this semaphore, only
457       * if all are available at the time of invocation.
458 +     *
459       * <p>Acquires the given number of permits, if they are available, and
460       * returns immediately, with the value <tt>true</tt>,
461       * reducing the number of available permits by the given amount.
# Line 571 | Line 572 | public class Semaphore implements java.i
572      }
573  
574      /**
575 <     * Return the current number of permits available in this semaphore.
575 >     * Returns the current number of permits available in this semaphore.
576       * <p>This method is typically used for debugging and testing purposes.
577       * @return the number of permits available in this semaphore.
578       */
# Line 588 | Line 589 | public class Semaphore implements java.i
589      }
590  
591      /**
592 <     * Shrink the number of available permits by the indicated
592 >     * Shrinks the number of available permits by the indicated
593       * reduction. This method can be useful in subclasses that use
594       * semaphores to track resources that become unavailable. This
595       * method differs from <tt>acquire</tt> in that it does not block

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines