class Puma::Reactor
def initialize(server, app_pool)
Once a request is fully formed (header and body are received)
The `app_pool` is an instance of `Puma::ThreadPool`.
when there is an exception inside of the reactor.
that is used to write a response for "low level errors"
The `server` argument is an instance of `Puma::Server`
Creates an instance of Puma::Reactor
def initialize(server, app_pool) @server = server @events = server.events @app_pool = app_pool @selector = NIO::Selector.new @mutex = Mutex.new # Read / Write pipes to wake up internal while loop @ready, @trigger = Puma::Util.pipe @input = [] @sleep_for = DefaultSleepFor @timeouts = [] mon = @selector.register(@ready, :r) mon.value = @ready @monitors = [mon] end