Send-loop.

def __sender(self):
        """Send-loop."""

        # 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:
                (command, parts) = self.__outgoing_q.get(block=False)
            except gevent.queue.Empty:
                gevent.sleep(nsq.config.client.WRITE_THROTTLE_S)
            else:
                _logger.debug("Dequeued outgoing command ((%d) remaining): "
                              "[%s]", self.__outgoing_q.qsize(), 
                              self.__distill_command_name(command))

                self.__send_command_primitive(command, parts)

        self.__send_thread_ev.set()