Module: EventMachine::PosixMQ
- Defined in:
- lib/em-posixmq/version.rb,
lib/em-posixmq.rb
Defined Under Namespace
Classes: Watcher
Constant Summary collapse
- VERSION =
"0.2.1"
Class Method Summary collapse
Class Method Details
.run(posix_mq, handler) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/em-posixmq.rb', line 26 def self.run(posix_mq, handler) raise Error, "EventMachine is not running" unless EM.reactor_running? raise Error, "`posix_mq' argument must be a POSIX_MQ instance" unless posix_mq.is_a? POSIX_MQ conn = EM.watch posix_mq.to_io, handler, posix_mq conn.notify_readable = true return conn end |