src/main/java/com/workplacesystems/utilsj/threadpool/WorkerThread.java
@Override
public void run() {
      while (running) {
         Runnable _runnable = null;
         synchronized (this) {
            while (running && runnable == null) {
               try {
                  this.wait();
               } catch (InterruptedException e) {} // Ignore, as interrupts are not used by the pool itself
            }
            _runnable = runnable;
         }

         if (_runnable != null) {
            try {
              _runnable.run();
            } catch (Exception e) {
               log.error("", e);
            } finally {
               synchronized (this) {
                  if (syncObject != null) {
                     synchronized (syncObject) {
                        syncObject.notify();
                     }
                  }
                  reset();
                  returnToPool();
               }
            }
         }
      }
   }
@Override
public void run() {
      while (running) {
         Runnable _runnable = null;
         synchronized (this) {
            while (running && runnable == null) {
               try {
                  this.wait();
               } catch (InterruptedException e) {} // Ignore, as interrupts are not used by the pool itself
            }
            _runnable = runnable;
         }

         if (_runnable != null) {
            try {
              _runnable.run();
            } catch (Exception e) {
               log.error("", e);
            } finally {
               synchronized (this) {
                  if (syncObject != null) {
                     synchronized (syncObject) {
                        syncObject.notify();
                     }
                  }
                  reset();
                  returnToPool();
               }
            }
         }
      }
   }
@ Override public void run ( ) { while ( running ) { Runnable _runnable = null ; synchronized ( this ) { while ( running && runnable == null ) { try { this . wait ( ) ; } catch ( InterruptedException e ) { } // Ignore, as interrupts are not used by the pool itself
 } _runnable = runnable ; } if ( _runnable != null ) { try { _runnable . run ( ) ; } catch ( Exception e ) { log . error ( "" , e ) ; } finally { synchronized ( this ) { if ( syncObject != null ) { synchronized ( syncObject ) { syncObject . notify ( ) ; } } reset ( ) ; returnToPool ( ) ; } } } } }
/* (non-Javadoc)
@see java.lang.Runnable#run()
/ * ( non - Javadoc )