You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by sg...@apache.org on 2005/05/09 14:06:16 UTC

cvs commit: jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/yaafi/service/shutdown ShutdownServiceImpl.java

sgoeschl    2005/05/09 05:06:16

  Modified:    yaafi/src/java/org/apache/fulcrum/yaafi/service/shutdown
                        ShutdownServiceImpl.java
  Log:
  Forgot sleeping while polling for termination resulting in excessive CPU usage
  
  Revision  Changes    Path
  1.2       +9 -0      jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/yaafi/service/shutdown/ShutdownServiceImpl.java
  
  Index: ShutdownServiceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/yaafi/service/shutdown/ShutdownServiceImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ShutdownServiceImpl.java	7 Apr 2005 11:39:09 -0000	1.1
  +++ ShutdownServiceImpl.java	9 May 2005 12:06:16 -0000	1.2
  @@ -199,6 +199,15 @@
       {
           while( this.terminateNow == false )
           {
  +            try
  +            {
  +                Thread.sleep( this.interval );
  +            }
  +            catch (InterruptedException e)
  +            {
  +                ; // nothing to do
  +            } 
  +            
               if( this.hasShutdownEntry() && this.getShutdownEntry().hasChanged() )
               {
                   if( this.serviceManager instanceof Disposable )
  
  
  

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