マップ機能にプログレス バーを追加したいと考えていました。しかしtqdm
、それらに追加した後、それらは非同期のようです。コーディング:
print("---> First…")
res = map(func1, tqdm(res))
print("---> Second…")
res = map(func2, tqdm(res))
端末の出力:
---> First… 0%| | 0/607 [00:00<?, ?it/s] ---> Second… 100%|████████████████████████████████████████| 607/607 [00:01<00:00, 382.76it/s] 607it [00:01, 382.76it/s]
それらを同期させる機会はありますか?