The following code hangs: --- import multiprocessing, time pool = multiprocessing.Pool(1) result = pool.apply_async(time.sleep, (1.0,)) pool.terminate() result.get() --- pool.terminate() terminates workers before time.sleep(1.0) completes, but the pool doesn't mark result as completed with an error. Would it be possible to mark all pending tasks as failed? For example, "raise" a RuntimeError("pool terminated before task completed").
Pablo: since you worked on multiprocessing recently, did you see this bug? I'm not sure about my PR 11139... If someone else wants to work on a fix, ignore my PR ;-)
History
Date
User
Action
Args
2022-04-11 14:59:09
admin
set
github: 79659
2021-09-21 22:26:36
vstinner
set
status: open -> closedresolution: out of datestage: patch review -> resolved