protected void decrementTaskCount(){
  taskCountLock.lock();
  try {
    taskCount--;
    if (taskCount == 0) {
synchronized (threadPool) {
        threadPool.notify();
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    taskCountLock.unlock();
  }
}

protected void decrementTaskCount ( ) { taskCountLock . lock ( ) ; try { taskCount -- ; if ( taskCount == 0 ) { synchronized ( threadPool ) { threadPool . notify ( ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { taskCountLock . unlock ( ) ; } }
decrements the number of running tasks . if this number is 0 , the threadpool is notified .
