Class: Rack::Lock
- Inherits:
-
Object
- Object
- Rack::Lock
- Defined in:
- lib/rack/lock.rb
Overview
Rack::Lock locks every request inside a mutex, so that every request will effectively be executed synchronously.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, mutex = Mutex.new) ⇒ Lock
constructor
A new instance of Lock.
Constructor Details
#initialize(app, mutex = Mutex.new) ⇒ Lock
Returns a new instance of Lock.
9 10 11 |
# File 'lib/rack/lock.rb', line 9 def initialize(app, mutex = Mutex.new) @app, @mutex = app, mutex end |