jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asm...@apache.org
Subject cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/utils/locking ReadWriteLock.java
Date Mon, 10 May 2004 01:17:36 GMT
asmuts      2004/05/09 18:17:36

  Modified:    src/java/org/apache/jcs/utils/locking ReadWriteLock.java
  Log:
  Small changed to log level and some testing changes.
  
  Revision  Changes    Path
  1.5       +5 -3      jakarta-turbine-jcs/src/java/org/apache/jcs/utils/locking/ReadWriteLock.java
  
  Index: ReadWriteLock.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/utils/locking/ReadWriteLock.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ReadWriteLock.java	15 Apr 2004 19:22:51 -0000	1.4
  +++ ReadWriteLock.java	10 May 2004 01:17:36 -0000	1.5
  @@ -121,11 +121,12 @@
           {
               while ( thisThread != writeLockedThread )
               {
  +                //outstandingWriteLocks++; //testing
                   log.debug( "writeLock wait" );
                   // set this so if there is an error the app will not completely die!
                   thisThread.wait( 2000 );
                   log.debug( "wake up from writeLock wait" );
  -            }
  +             }
   
               log.debug( "writeLock acquired" );
           }
  @@ -176,7 +177,6 @@
   
           if ( Thread.currentThread() == writeLockedThread )
           {
  -
               //log.info( "outstandingWriteLocks= " + outstandingWriteLocks );
               if ( outstandingWriteLocks > 0 )
               {
  @@ -184,7 +184,7 @@
               }
               else
               {
  -                log.warn( "extra lock release, writelocks are " + outstandingWriteLocks
+ "and done was called" );
  +                log.info( "extra lock release, writelocks are " + outstandingWriteLocks
+ "and done was called" );
               }
   
               if ( outstandingWriteLocks > 0 )
  @@ -192,6 +192,8 @@
                   log.debug( "writeLock released for a nested writeLock request." );
                   return;
               }
  +
  +            // could pull out of sub if block to get nested tracking working.
               if ( outstandingReadLocks == 0 && waitingForWriteLock.size() > 0
)
               {
                   writeLockedThread = ( Thread ) waitingForWriteLock.get( 0 );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Mime
View raw message