class Puma::Reactor

def shutdown

Shutdown the reactor, blocking until the background thread is finished.
def shutdown
  @input.close
  begin
    @selector.wakeup
  rescue IOError # Ignore if selector is already closed
  end
  @thread&.join
end