lib/rabbitmq/client.rb
def run_loop!(timeout: protocol_timeout, &block)
      timeout = Float(timeout) if timeout
      @breaking = false
      fetch_events(timeout, &block)
      nil
    end
def run_loop!(timeout: protocol_timeout, &block)
      timeout = Float(timeout) if timeout
      @breaking = false
      fetch_events(timeout, &block)
      nil
    end
Fetch and handle events in a loop that blocks the calling thread.
 The loop will continue until the {#break!} method is called from within
 an event handler, or until the given timeout duration has elapsed.

 @param timeout [Float] the maximum time to run the loop, in seconds;
   if none is given, the value is {#protocol_timeout} or until {#break!}
 @param block [Proc,nil] if given, the block will be yielded each
   non-exception event received on any channel. Other handlers or
   response fetchings that match the event will still be processed,
   as the block does not consume the event or replace the handlers.
 @return [undefined] assume no value - reserved for future use.