Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make lock a class instance variable instead of a class variable

  • Loading branch information...
commit d36c3f33790b3a87e0f09f82fabc2b68a4fd9f22 1 parent e423ccc
@ryanlecompte ryanlecompte authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/girl_friday.rb
View
6 lib/girl_friday.rb
@@ -17,10 +17,10 @@
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
@@ -28,7 +28,7 @@ def self.add_queue(ref)
end
def self.remove_queue(ref)
- @@lock.synchronize do
+ @lock.synchronize do
@queues.delete ref
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.