code: def __receiver(self):
          
  
          # If we're ignoring the quit, the connections will have to be closed 
          # by the server.
          while (self.__ignore_quit is True or \
                 self.__nice_quit_ev.is_set() is False) and \
                self.__force_quit_ev.is_set() is False:
  
  # TODO(dustin): The quit-signals aren't being properly set after a producer 
  #               stop.
  
  # TODO(dustin): Consider breaking the loop if we haven't yet retried to 
  #               reconnect a couple of times. A connection will automatically be 
  #               reattempted.
  
              try:
                  self.__read_frame()
              except errno.EAGAIN:
                  gevent.sleep(nsq.config.client.READ_THROTTLE_S)
  
          self.__receive_thread_ev.set()
docs: Receive-loop.