Lines Matching refs:Worker
44 def Worker(fn, work_queue, done_queue, done,
46 """Worker to be run in a child process.
47 The worker stops on two conditions. 1. When the poison pill "STOP" is
67 """Distributes tasks to a number of worker processes.
82 # worker takes an item from the work_queue and before the result is
83 # submitted to the done_queue. It is equal when no worker is working,
96 """Maps function "fn" to items in generator "gen" on the worker processes
104 process_context_fn: Function executed once by each worker. Expected to
117 p = Process(target=Worker, args=(fn,
143 # A keyboard interrupt happened in one of the worker processes.
151 raise Exception("Internal error in a worker process.")
182 # per worker to make them stop.