Message360253
I now have a working implementation, for both ThreadPoolExecutor and ProcessPoolExecutor. I've also ensured that the tests I added are not vulnerable to race conditions with the following:
```
[aeros:~/repos/aeros-cpython]$ ./python -m test test_concurrent_futures --match test_cancel_futures -j200 -v -F
[snip]
Ran 4 tests in 2.865s
OK
0:03:24 load avg: 143.25 [1018] test_concurrent_futures passed -- running: test_concurrent_futures (2 min 36 sec), test_concurrent_futures (35.8 sec)
test_cancel_futures (test.test_concurrent_futures.ProcessPoolForkProcessPoolShutdownTest) ... 0.57s ok
test_cancel_futures (test.test_concurrent_futures.ProcessPoolForkserverProcessPoolShutdownTest) ... 0.80s ok
test_cancel_futures (test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest) ... 0.53s ok
test_cancel_futures (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.20s ok
```
I'll attach a PR to the issue once I finish writing the documentation and "What's New" entry.
Note: I was originally going to do this in two separate PRs, one for each executor, but it seemed to make more sense to just have it as a single cohesive PR since Executor.shutdown() shares the same documentation for both executors. |
|
Date |
User |
Action |
Args |
2020-01-19 03:14:06 | aeros | set | recipients:
+ aeros, bquinlan, pitrou |
2020-01-19 03:14:05 | aeros | set | messageid: <1579403645.97.0.246406944951.issue39349@roundup.psfhosted.org> |
2020-01-19 03:14:05 | aeros | link | issue39349 messages |
2020-01-19 03:14:05 | aeros | create | |
|