Message331724
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"). |
|
Date |
User |
Action |
Args |
2018-12-13 00:30:51 | vstinner | set | recipients:
+ vstinner, pablogsal |
2018-12-13 00:30:51 | vstinner | set | messageid: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za> |
2018-12-13 00:30:51 | vstinner | link | issue35478 messages |
2018-12-13 00:30:51 | vstinner | create | |
|