Slow futures.ProcessPoolExecutor: how to improve? – Debian
I'm trying to understand why the following code is so slow: import threading import time import concurrent.futures from datetime import datetime def dump(txt): print(f'[{datetime.now()}] ({threading.get_ident():05}) {txt}n', end='') def sleep_(_): dump('Start') time.sleep(0.1) dump('Stop') def main(n=10, processes=10): dump('before with') with concurrent.futures.ProcessPoolExecutor(processes) as…