Module: OMQ::Readable
- Includes:
- QueueReadable
- Defined in:
- lib/omq/readable.rb
Overview
Pure Ruby Readable mixin. Dequeues messages from the engine’s recv queue.
Instance Method Summary collapse
-
#receive ⇒ Array<String>
Receives the next message directly from the engine recv queue.
-
#wait_readable(timeout = @options.read_timeout) ⇒ true
Waits until the socket is readable.
Methods included from QueueReadable
Instance Method Details
#receive ⇒ Array<String>
Receives the next message directly from the engine recv queue.
16 17 18 19 20 |
# File 'lib/omq/readable.rb', line 16 def receive Reactor.run timeout: @options.read_timeout do |task| @engine.dequeue_recv end end |
#wait_readable(timeout = @options.read_timeout) ⇒ true
Waits until the socket is readable.
28 29 30 |
# File 'lib/omq/readable.rb', line 28 def wait_readable(timeout = @options.read_timeout) true end |