code: private synchronized void reallocateEvaluator(final ActiveContext context) {
      nActiveEval--;
      context.close();
  
      if (scheduler.hasPendingTasks()) {
        requestEvaluator(1);
      } else if (nActiveEval <= 0) {
        state = State.WAIT_EVALUATORS;
        requestEvaluator(1);
      }
    }
docs: Always close the complete evaluators and
  allocate a new evaluator if necessary.