7172737475767778798081
} } Scheduler waitWhileSchedulerIsStarting() throws InterruptedException { Scheduler result = null; synchronized (schedulerAtomLock) { while (state == SchedulerState.starting) schedulerAtomLock.wait(); result = schedulerAtom.get(); }
828384858687888990919293
return result; } void terminate() { Scheduler scheduler = null; synchronized (schedulerAtomLock) { scheduler = schedulerAtom.get(); if (scheduler == null) terminateSchedulerWhenPossible = true; } if (scheduler != null) scheduler.terminate(); }
8384858687888990919293
} @Override public final Scheduler waitUntilSchedulerIsRunning() { try { Scheduler result = coOp.waitWhileSchedulerIsStarting(); throwableMailbox.throwUncheckedIfSet(); if (result == null) { throw new SchedulerException("Scheduler aborted before startup"); } return result;