def _kill_workers(task_queue, num_workers):
'''
Sends a NoneType poision pill to all active workers.
Args:
task_queue (JoinableQueue): The task queue upon which
to put the poision pills
num_workers (int): The number of workers, which translates
to the number of poision pills to put in the queue
'''
for w in range(num_workers): task_queue.put(None)
评论列表
文章目录