in tools.py [0:0]
def add_task(self, task): with self._condition: self._task_queue.put(task) self._condition.notify()