Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ok saywatmang, I'll do it a bit more right, but :(, hashes aren't the…

… tool here eh.
  • Loading branch information...
commit e946183a140ba251d30ab734362910231e0bf32e 1 parent 3d52e24
James Tucker raggi authored
Showing with 3 additions and 7 deletions.
  1. +0 −6 proxy.rb
  2. +3 −1 util/synchronizable.rb
6 proxy.rb
View
@@ -27,12 +27,6 @@ module ProxyServer
include LineBufferedConnection, Deferrable
extend Synchronizable
- def initialize
- # Hash defaults are thread safe? on which interpreters?
- synchronize(:servers) {}
- synchronize(:balancer) {}
- end
-
def receive_line(line)
defer do
$stats.transaction do
4 util/synchronizable.rb
View
@@ -6,7 +6,9 @@ def mutex
# initialize/new and having included and extended callbacks.
@@mutex.synchronize do
@mutex ||= Hash.new do |h,k|
- h[k] = Mutex.new
+ @@mutex.synchronize do
+ h[k] = Mutex.new
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.