Class: Unicorn::Timeout
- Inherits:
-
Object
- Object
- Unicorn::Timeout
- Defined in:
- lib/unicorn/timeout.rb,
lib/unicorn/timeout/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Class Attribute Summary collapse
-
.handler ⇒ Object
Returns the value of attribute handler.
-
.signal ⇒ Object
Returns the value of attribute signal.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Timeout
constructor
A new instance of Timeout.
Constructor Details
#initialize(app) ⇒ Timeout
Returns a new instance of Timeout.
12 13 14 |
# File 'lib/unicorn/timeout.rb', line 12 def initialize(app) @app = app end |
Class Attribute Details
.handler ⇒ Object
Returns the value of attribute handler.
8 9 10 |
# File 'lib/unicorn/timeout.rb', line 8 def handler @handler end |
.signal ⇒ Object
Returns the value of attribute signal.
9 10 11 |
# File 'lib/unicorn/timeout.rb', line 9 def signal @signal end |
.timeout ⇒ Object
Returns the value of attribute timeout.
7 8 9 |
# File 'lib/unicorn/timeout.rb', line 7 def timeout @timeout end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/unicorn/timeout.rb', line 16 def call(env) t = setup_mon_thread begin @app.call(env) ensure kill_mon_thread(t) end end |