class Async::Scheduler

def run_loop(&block)

def run_loop(&block)
pt = nil
heory, we could use Exception here to be a little bit safer, but we've only shown the case for SignalException to be a problem, so let's not over-engineer this.
.handle_interrupt(::SignalException => :never) do
 self.interrupted?
 we are finished, we need to exit:
k unless yield
Interrupt => interrupt
.handle_interrupt(::SignalException => :never) do
stop
e event loop was interrupted, and we finished exiting normally (due to the interrupt), we need to re-raise the interrupt so that the caller can handle it too.
raise(interrupt) if interrupt