MCPcopy Create free account
hub / github.com/NVIDIA/DALI / worker

Function worker

dali/test/python/test_external_source_parallel_shared_batch.py:70–77  ·  view source on GitHub ↗
(start_method, sock, task_queue, res_queue, worker_cb, worker_params)

Source from the content-addressed store, hash-verified

68
69
70def 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

Calls 2

open_shmMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected