This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pablogsal, vstinner
Date 2018-12-13.00:30:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za>
In-reply-to
Content
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").
History
Date User Action Args
2018-12-13 00:30:51vstinnersetrecipients: + vstinner, pablogsal
2018-12-13 00:30:51vstinnersetmessageid: <1544661051.76.0.788709270274.issue35478@psf.upfronthosting.co.za>
2018-12-13 00:30:51vstinnerlinkissue35478 messages
2018-12-13 00:30:51vstinnercreate