Skip to content
Browse files

Make lock a class instance variable instead of a class variable

  • Loading branch information...
1 parent e423ccc commit d36c3f33790b3a87e0f09f82fabc2b68a4fd9f22 @ryanlecompte ryanlecompte committed Sep 25, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/girl_friday.rb
View
6 lib/girl_friday.rb
@@ -17,18 +17,18 @@
module GirlFriday
- @@lock = Mutex.new
+ @lock = Mutex.new
def self.add_queue(ref)
- @@lock.synchronize do
+ @lock.synchronize do
@queues ||= []
@queues.reject! { |q| !q.weakref_alive? }
@queues << ref
end
end
def self.remove_queue(ref)
- @@lock.synchronize do
+ @lock.synchronize do
@queues.delete ref
end
end

0 comments on commit d36c3f3

Please sign in to comment.
Something went wrong with that request. Please try again.