Skip to content
Advertisement

Tag: deadlock

Occasional deadlock in multiprocessing.Pool

I have N independent tasks that are executed in a multiprocessing.Pool of size os.cpu_count() (8 in my case), with maxtasksperchild=1 (i.e. a fresh worker process is created for each new task). The main script can be simplified to: The pool sometimes gets stuck. The traceback when I do a KeyboardInterrupt is here. It indicates that the pool won’t fetch new

Advertisement