code: public synchronized void addWaitingTask(BuildTask task, Runnable taskReadyCallback) {
          unfinishedTasks.add(task);
          log.debug("adding waiting task: {}", task);
          waitingTasksWithCallbacks.put(task, taskReadyCallback);
      }
docs: Add a task that is waiting for dependencies
  @param task task that is not ready to build
  @param taskReadyCallback a callback to be invoked when the task becomes ready