docs: def flush(self):
          """Erases queue and set `end-of-queue` message."""
          while not self._queue.empty():
              self._queue.get()
              self._queue.task_done()
          self.close()