diff options
Diffstat (limited to 'lib/webrick')
-rw-r--r-- | lib/webrick/httpauth/digestauth.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpauth/htdigest.rb | 2 | ||||
-rw-r--r-- | lib/webrick/server.rb | 2 | ||||
-rw-r--r-- | lib/webrick/utils.rb | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/webrick/httpauth/digestauth.rb b/lib/webrick/httpauth/digestauth.rb index 98bdbd10c7..375ec20154 100644 --- a/lib/webrick/httpauth/digestauth.rb +++ b/lib/webrick/httpauth/digestauth.rb @@ -111,7 +111,7 @@ module WEBrick @instance_key = hexdigest(self.__id__, Time.now.to_i, Process.pid) @opaques = {} @last_nonce_expire = Time.now - @mutex = Mutex.new + @mutex = Thread::Mutex.new end ## diff --git a/lib/webrick/httpauth/htdigest.rb b/lib/webrick/httpauth/htdigest.rb index 4bb25e1724..1ef4fdb4aa 100644 --- a/lib/webrick/httpauth/htdigest.rb +++ b/lib/webrick/httpauth/htdigest.rb @@ -38,7 +38,7 @@ module WEBrick @path = path @mtime = Time.at(0) @digest = Hash.new - @mutex = Mutex::new + @mutex = Thread::Mutex::new @auth_type = DigestAuth open(@path,"a").close unless File::exist?(@path) reload diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index e2e99bfc5f..45bd9706d3 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -98,7 +98,7 @@ module WEBrick @config[:Logger] ||= Log::new @logger = @config[:Logger] - @tokens = SizedQueue.new(@config[:MaxClients]) + @tokens = Thread::SizedQueue.new(@config[:MaxClients]) @config[:MaxClients].times{ @tokens.push(nil) } webrickv = WEBrick::VERSION diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 846829b01f..eb3b907ecf 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -126,7 +126,7 @@ module WEBrick ## # Mutex used to synchronize access across threads - TimeoutMutex = Mutex.new # :nodoc: + TimeoutMutex = Thread::Mutex.new # :nodoc: ## # Registers a new timeout handler @@ -154,7 +154,7 @@ module WEBrick TimeoutMutex.synchronize{ @timeout_info = Hash.new } - @queue = Queue.new + @queue = Thread::Queue.new @watcher = nil end |