lib/rack/lock.rb in rack-1.4.7 vs lib/rack/lock.rb in rack-1.5.0.beta.1
- old
+ new
@@ -1,8 +1,10 @@
require 'thread'
require 'rack/body_proxy'
module Rack
+ # Rack::Lock locks every request inside a mutex, so that every request
+ # will effectively be executed synchronously.
class Lock
FLAG = 'rack.multithread'.freeze
def initialize(app, mutex = Mutex.new)
@app, @mutex = app, mutex