Crystal::Evented#run_internal should return a list of fibers to run, so the scheduler can resume one immediately and enqueue the rest in a single bulk operation (avoids parallel enqueues and N individual operations and a follow up dequeue).
Keep a single EventLoop instance per EC: MT doesn't need a blocked list anymore, and we don't need BlockedScheduler anymore either (we just need to know that a thread is waiting, so we can interrupt the eventloop, not which thread is waiting).
See https://github.com/crystal-lang/crystal/pull/14829
Also we can now try:
Crystal::Evented#run_internal
should return a list of fibers to run, so the scheduler can resume one immediately and enqueue the rest in a single bulk operation (avoids parallel enqueues and N individual operations and a follow up dequeue).Keep a single EventLoop instance per EC: MT doesn't need a blocked list anymore, and we don't need BlockedScheduler anymore either (we just need to know that a thread is waiting, so we can interrupt the eventloop, not which thread is waiting).