@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 ) { } } _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()