docs: def maybe_put_task(self):
          """Enqueue the next task, if there are any waiting."""
          try:
              task = next(self.tasks)
          except StopIteration:
              pass
          else:
              log.debug('Putting %s on queue', task)
              self.task_queue.put(task)