protected void incrementTaskCount(){
  taskCountLock.lock();
  try {
    taskCount++;
  }
  finally {
    taskCountLock.unlock();
  }
}

protected void incrementTaskCount ( ) { taskCountLock . lock ( ) ; try { taskCount ++ ; } finally { taskCountLock . unlock ( ) ; } }
increments the number of running tasks .
