Class: Rack::Lock
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rack/lock.rb |
Overview
Lock
locks every request inside a mutex, so that every request will effectively be executed synchronously.
Class Method Summary
- .new(app, mutex = Mutex.new) ⇒ Lock constructor
Instance Method Summary
- #call(env)
- #unlock private
Constructor Details
.new(app, mutex = Mutex.new) ⇒ Lock
# File 'lib/rack/lock.rb', line 9
def initialize(app, mutex = Mutex.new) @app, @mutex = app, mutex end
Instance Method Details
#call(env)
[ GitHub ]#unlock (private)
[ GitHub ]# File 'lib/rack/lock.rb', line 25
def unlock @mutex.unlock end