📅  最后修改于: 2022-03-11 14:47:00.909000             🧑  作者: Mango
import concurrent.futures
import tqdm
work_list = list(range(16))
def calc(x):
return x ** x
with concurrent.futures.ProcessPoolExecutor() as executor:
results = list(tqdm.tqdm(executor.map(calc, work_list), total=len(work_list)))
print(results)