Sha256: 1a2caa37e915fbacd688a7ac9be0027ef0c342a0d6a10772dde97d1bebecde0e
Contents?: true
Size: 296 Bytes
Versions: 50
Compression:
Stored size: 296 Bytes
Contents
module Rack class Lock FLAG = 'rack.multithread'.freeze def initialize(app, lock = Mutex.new) @app, @lock = app, lock end def call(env) old, env[FLAG] = env[FLAG], false @lock.synchronize { @app.call(env) } ensure env[FLAG] = old end end end
Version data entries
50 entries across 49 versions & 16 rubygems