Sha256: 5abdd273a7d2bf18988d117c7c1206c7065e4211691f29fa72edb11ac72bb220
Contents?: true
Size: 636 Bytes
Versions: 6
Compression:
Stored size: 636 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.shutdown @consume_thread_pool.wait_for_termination end end end
Version data entries
6 entries across 6 versions & 1 rubygems