Ejemplo n.º 1
0
 @Override
 protected boolean jobAbort() {
   Interpreter repl = getRepl(getRequiredReplName());
   Job job = repl.getScheduler().removeFromWaitingQueue(getId());
   if (job != null) {
     job.setStatus(Status.ABORT);
   } else {
     repl.cancel(getInterpreterContext());
   }
   return true;
 }
Ejemplo n.º 2
0
  @Override
  protected boolean jobAbort() {
    Interpreter repl = getRepl(getRequiredReplName());
    if (repl == null) {
      // when interpreters are already destroyed
      return true;
    }

    Scheduler scheduler = repl.getScheduler();
    if (scheduler == null) {
      return true;
    }

    Job job = scheduler.removeFromWaitingQueue(getId());
    if (job != null) {
      job.setStatus(Status.ABORT);
    } else {
      repl.cancel(getInterpreterContext());
    }
    return true;
  }