Function
worker
(start_method, sock, task_queue, res_queue, worker_cb, worker_params)
Source from the content-addressed store, hash-verified
| 68 | |
| 69 | |
| 70 | def worker(start_method, sock, task_queue, res_queue, worker_cb, worker_params): |
| 71 | if start_method == "spawn": |
| 72 | task_queue.open_shm(multiprocessing.reduction.recv_handle(sock)) |
| 73 | res_queue.open_shm(multiprocessing.reduction.recv_handle(sock)) |
| 74 | sock.close() |
| 75 | while True: |
| 76 | if worker_cb(task_queue, res_queue, **worker_params) is None: |
| 77 | break |
| 78 | |
| 79 | |
| 80 | @contextmanager |
Callers
nothing calls this directly
Tested by
no test coverage detected