Module: Pry::Shell::Patches::RackTimeout
- Defined in:
- lib/pry/shell/patches/rack_timeout.rb
Instance Method Summary collapse
Instance Method Details
#initialize(&on_timeout) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/pry/shell/patches/rack_timeout.rb', line 7 def initialize(&on_timeout) timeout_handler = on_timeout || ON_TIMEOUT @on_timeout = -> (thread) { Shell.(thread: thread) || timeout_handler.call(thread) } # Do not raise timeout error if the shell session is active @scheduler = Rack::Timeout::Scheduler.singleton end |