public void interrupt() { Selector activeSelector = currentSelector; if (activeSelector != null) { activeSelector.wakeup(); } BlockingIO.Condition iowait = blockingIO; if (iowait != null) { iowait.cancel(); } BlockingTask task = currentBlockingTask; if (task != null) { task.wakeup(); } }