Created
April 24, 2020 17:17
-
-
Save falexandrou/477a7da466229bb2517edf199bd79365 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
with ThreadPoolExecutor(max_workers=os.cpu_count()) as executor: | |
futures = executor.map(process_func, plays) | |
for future in as_completed(futures, timeout=None): | |
failures += 1 if future.exception() else 0 | |
executor.shutdown(wait=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment