public void addCommand(CoreCmd ccmd){
  commandQueue.add(ccmd);
  lock.lock();
  try {
    workAvailable.signal();
  }
  finally {
    lock.unlock();
  }
}

public void addCommand ( CoreCmd ccmd ) { commandQueue . add ( ccmd ) ; lock . lock ( ) ; try { workAvailable . signal ( ) ; } finally { lock . unlock ( ) ; } }
adds command to the command queue . does not block . called by the command object .
