sk.interestOps(0);
if (o instanceof SockEvent) {
SockEvent ev = (SockEvent) o;
ev.replyTo.putnb(ev);
} else if (o instanceof Task) {
Task t = (Task) o;
t.resume();
}
}
}
runnables.reset();
runnables = _scheduler.swapRunnables(runnables);
// Now execute all runnables inline
// if (runnables.size() == 0) {
// System.out.println("IDLE");
// }
while (runnables.size() > 0) {
Task t = runnables.get();
t._runExecute(null);
// If task calls Task.yield, it would have added itself to scheduler already.
// If task's pauseReason is YieldToSelector, then nothing more to do.
// Task should be registered for the appropriate Selector op.
// In all other cases, (Task.sleep(), Mailbox.get() etc.), unregister
// the channel