Class: Rack::AMQP::Client::Synchronizer

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rack/amqp/client.rb

Instance Method Summary collapse

Constructor Details

#initializeSynchronizer

Returns a new instance of Synchronizer.



18
19
20
21
# File 'lib/rack/amqp/client.rb', line 18

def initialize
  @mutex = Mutex.new
  super
end

Instance Method Details

#client(*args) ⇒ Object



23
24
25
26
27
# File 'lib/rack/amqp/client.rb', line 23

def client(*args)
  @mutex.synchronize do # TODO this probably doesn't help anything here
    @mgr ||= Manager.new(*args)
  end
end