code: public PlanContext fork(Task<?> root) {
      int pending;
      while ((pending = _pending.get()) > 0) {
        if (_pending.compareAndSet(pending, pending + 1)) {
          return new PlanContext(root, _id, _engine, _taskExecutor,
              _timerScheduler, _planClass, _taskLogger, _relationshipsBuilder, p -> done());
        }
      }
      return null;
    }
docs: Creates a new {@link PlanContext} from the current plan for the given root
  {@link Task}. The new plan can be completed independently from the current plan.
  
  @param root root task of the sub plan
  @return a new PlanContext if this plan is not completed. Otherwise, returns null.