Message132614
A long running task that is submitted to an ThreadPoolExecutor runs to completion even when the future times out or is canceled.
Even executor.shutdown(wait=False) will not help.
HOW TO REPEAT:
Provide a function which sleeps for 10 seconds.
Submit it to a ThreadPoolExecutor.
Wait on the future for the result for 2 seconds.
OBSERVED BEHAVIOUR:
1. future times out after approx. 2 seconds
2. Process shutdown is delayed by an additional 8 seconds,
meaning it waits until submitted task/function has completed. |
|
Date |
User |
Action |
Args |
2011-03-30 21:00:09 | jenisys | set | recipients:
+ jenisys |
2011-03-30 21:00:09 | jenisys | set | messageid: <1301518809.28.0.175951319539.issue11724@psf.upfronthosting.co.za> |
2011-03-30 21:00:08 | jenisys | link | issue11724 messages |
2011-03-30 21:00:08 | jenisys | create | |
|