class Freddy::ResponderHandler
Public Class Methods
new(consumer, consume_thread_pool)
click to toggle source
# File lib/freddy/responder_handler.rb, line 5 def initialize(consumer, consume_thread_pool) @consumer = consumer @consume_thread_pool = consume_thread_pool end
Public Instance Methods
shutdown()
click to toggle source
Shutdown responder
Stop responding to messages immediately, Waits until all workers are finished and then returns.
@return [void]
@example
responder = freddy.respond_to 'Queue' do |msg, handler| end responder.shutdown
# File lib/freddy/responder_handler.rb, line 21 def shutdown @consumer.cancel @consume_thread_pool.shutdown @consume_thread_pool.wait_for_termination end