@Override public void run() { while (executor.isRunning()) { final DelayedWithTimeout task = DelayedUtil.takeWithoutInterrupt(queue); if (task == null || task == DelayedUtil.DELAYED_POISON) { // the executor may be shutting down, // and the task is just the shutdown request continue; } LOG.trace("Executing {}", task); // execute the task if (task instanceof InlineChore) { execInlineChore((InlineChore) task); } else if (task instanceof DelayedProcedure) { execDelayedProcedure((DelayedProcedure<TEnvironment>) task); } else { LOG.error("CODE-BUG unknown timeout task type {}", task); } } }
@Override public void run() { while (executor.isRunning()) { final DelayedWithTimeout task = DelayedUtil.takeWithoutInterrupt(queue); if (task == null || task == DelayedUtil.DELAYED_POISON) { // the executor may be shutting down, // and the task is just the shutdown request continue; } LOG.trace("Executing {}", task); // execute the task if (task instanceof InlineChore) { execInlineChore((InlineChore) task); } else if (task instanceof DelayedProcedure) { execDelayedProcedure((DelayedProcedure) task); } else { LOG.error("CODE-BUG unknown timeout task type {}", task); } } }
@Override public void run() { while (executor.isRunning()) { final DelayedWithTimeout task = DelayedUtil.takeWithoutInterrupt(queue); if (task == null || task == DelayedUtil.DELAYED_POISON) { // the executor may be shutting down, // and the task is just the shutdown request continue; } LOG.trace("Executing {}", task); // execute the task if (task instanceof InlineChore) { execInlineChore((InlineChore) task); } else if (task instanceof DelayedProcedure) { execDelayedProcedure((DelayedProcedure<TEnvironment>) task); } else { LOG.error("CODE-BUG unknown timeout task type {}", task); } } }