Sha256: 83bddb9211136be4513f9451d321f2d71bb020ef58dfaa10faa620c45b6f485b
Contents?: true
Size: 591 Bytes
Versions: 13
Compression:
Stored size: 591 Bytes
Contents
# frozen_string_literal: true class Freddy class ResponderHandler def initialize(consumer, consume_thread_pool) @consumer = consumer @consume_thread_pool = consume_thread_pool end # 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 def shutdown @consumer.cancel @consume_thread_pool.wait(:done) end end end
Version data entries
13 entries across 13 versions & 1 rubygems