'Writes a sentinel to the queue to tell the listener to quit. This
implementation uses ``put_nowait()``.  You may want to override this
method if you want to use timeouts or work with custom queue
implementations.'

def enqueue_sentinel(self):

    self.queue.put_nowait(self._sentinel)
