Running tqdm with Python multiprocessing
Redowan Delowar
November 18, 2021
Making tqdm play nice with multiprocessing requires some additional work. It's not always obvious and I don't want to add another third-party dependency just for this purpose.
The following example attempts to make tqdm work with multiprocessing.imap_unordered. However, this should also work with similar mapping methods like - multiprocessing.map, multiprocessing.imap, multiprocessing.starmap, etc.
This will print:
Further reading
Discussion in the ATmosphere