# File lib/amqp/channel.rb, line 133 def initialize(connection = nil) raise 'AMQP can only be used from within EM.run {}' unless EM.reactor_running? @_send_mutex = Mutex.new @get_queue_mutex = Mutex.new @connection = connection || AMQP.start conn.callback { |c| @channel = c.add_channel(self) send Protocol::Channel::Open.new } end