[issue38799] race condition in multiprocessing.Pool with maxtasksperchild=1

2020-01-18 Thread Jacopo Tediosi
Jacopo Tediosi added the comment: Happening to me on Python3.9 too Also when calling pool.terminate(), causing my script to hang -- nosy: +Jacopo Tediosi versions: +Python 3.9 -Python 3.6 ___ Python tracker

[issue38799] race condition in multiprocessing.Pool with maxtasksperchild=1

2019-11-14 Thread Steve Lorimer
New submission from Steve Lorimer : There is a race condition when closing/joining a pool with maxtasksperchild=1 Illustrative example: ``` #!/usr/bin/env python3 import os import time import logging import multiprocessing.pool def run_task(i): print(f'[{os.getpid()}] task({i}) complete')