-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt interface I don't like to one I do like
- Loading branch information
Showing
3 changed files
with
66 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# --------------------------------------------------------------------------- # | ||
# executor.py # | ||
# # | ||
# Copyright © 2015-2020, Rajiv Bakulesh Shah, original author. # | ||
# All rights reserved. # | ||
# --------------------------------------------------------------------------- # | ||
|
||
|
||
import concurrent.futures | ||
|
||
|
||
class BailOutExecutor(concurrent.futures.ThreadPoolExecutor): | ||
def __exit__(self, exc_type, exc_val, exc_tb): | ||
self.shutdown(wait=False) | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters