MCPcopy Create free account
hub / github.com/pydata/numexpr / future_worker

Function future_worker

numexpr3/tests/test_numexpr.py:678–683  ·  view source on GitHub ↗

Multiprocessing cannot deal with bound methods, as they aren't pickleable.

(neObj: ne3.NumExpr, data: dict, N_threads: int=2)

Source from the content-addressed store, hash-verified

676# Tests for threading/multiprocessing/concurrent.futures
677
678def future_worker(neObj: ne3.NumExpr, data: dict, N_threads: int=2):
679 '''
680 Multiprocessing cannot deal with bound methods, as they aren't pickleable.
681 '''
682 ne3.set_nthreads(N_threads)
683 return neObj(**data)
684
685
686# Case test for subprocesses (via multiprocessing module)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…