3 ms·
You could just use threads here too - CPython releases the GIL during IO. from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor as exe
by pddubs 8y ago
You could just use threads here too - CPython releases the GIL during IO.
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor as executor:
executor.map(function, sequence)