from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor as executor: executor.map(function, sequence)