You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mo...@apache.org on 2002/03/21 05:44:11 UTC

cvs commit: jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent Mutex.java Semaphore.java

morpheus    02/03/20 20:44:11

  Modified:    all/src/java/org/apache/avalon/excalibur/concurrent
                        Mutex.java Semaphore.java
  Log:
  Added simple javadocs.
  
  Revision  Changes    Path
  1.4       +2 -1      jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/Mutex.java
  
  Index: Mutex.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/Mutex.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Mutex.java	11 Dec 2001 09:53:28 -0000	1.3
  +++ Mutex.java	21 Mar 2002 04:44:11 -0000	1.4
  @@ -8,8 +8,9 @@
   package org.apache.avalon.excalibur.concurrent;
   
   /**
  + * A mutual exclusion {@link Semaphore}.
    *
  - * @version CVS $Revision: 1.3 $ $Date: 2001/12/11 09:53:28 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/03/21 04:44:11 $
    * @since 4.0
    */
   
  
  
  
  1.6       +13 -2     jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/Semaphore.java
  
  Index: Semaphore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/java/org/apache/avalon/excalibur/concurrent/Semaphore.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Semaphore.java	16 Mar 2002 00:05:40 -0000	1.5
  +++ Semaphore.java	21 Mar 2002 04:44:11 -0000	1.6
  @@ -8,16 +8,27 @@
   package org.apache.avalon.excalibur.concurrent;
   
   /**
  + * This class implements a counting semaphore, also known as a
  + * Dijkstra semaphore.  A semaphore is used to control access to
  + * resources.  A counting semaphore has a count associated with it and
  + * each acquire() call reduces the count.  A thread that tries to
  + * acquire() a semaphore with a zero count blocks until someone else
  + * calls release(), which increases the count.
    *
  - * @version CVS $Revision: 1.5 $ $Date: 2002/03/16 00:05:40 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/03/21 04:44:11 $
    * @since 4.0
    */
  -
   public class Semaphore
       implements Sync
   {
       private long m_tokens;
   
  +    /**
  +     * Creates a semaphore with the specified number of tokens, which
  +     * determines the maximum number of acquisitions to allow.
  +     *
  +     * @param tokens the maximum number of acquisitions to allow
  +     */
       public Semaphore( final long tokens )
       {
           m_tokens = tokens;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>