File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 22
33## [ Unreleased] [ ]
44
5- [ Unreleased ] : https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.3...HEAD
5+ [ Unreleased ] : https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.4...HEAD
6+
7+ ## [ 0.8.4] [ ]
8+
9+ [ 0.8.4 ] : https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.3...0.8.4
10+
11+ ### Changed
12+
13+ - ` cancel_futures ` is only support in Python 3.9+
614
715## [ 0.8.3] [ ]
816
Original file line number Diff line number Diff line change 8282from concurrent .futures import Future , ThreadPoolExecutor
8383from datetime import datetime
8484from functools import partial
85+ import sys
8586import threading
8687import time
8788import traceback
@@ -240,9 +241,16 @@ def terminate(self) -> None:
240241
241242 self .wait_for_interruption .set ()
242243 self .repeating_until .set ()
243- self .now .shutdown (wait = False , cancel_futures = False )
244- self .repeating .shutdown (wait = False , cancel_futures = False )
245- self .once .shutdown (wait = False , cancel_futures = False )
244+
245+ if sys .version_info >= (3 , 9 ):
246+ self .now .shutdown (wait = True , cancel_futures = True )
247+ self .repeating .shutdown (wait = True , cancel_futures = True )
248+ self .once .shutdown (wait = True , cancel_futures = True )
249+ else :
250+ self .now .shutdown (wait = True )
251+ self .repeating .shutdown (wait = True )
252+ self .once .shutdown (wait = True )
253+
246254 logger .debug ("Guardian is now terminated" )
247255
248256
You can’t perform that action at this time.
0 commit comments