Since I need several args in my worker function, so I use starmap, but how can I show the progress with tqdm?
from itertools import repeat
from multiprocessing import Pool
def func(i, a, b, c):
print(i, a, b, c)
if __name__ == '__main__':
pool = Pool(thread_num)
a, b, c = 'a', 'b', 'c'
pool.starmap(func, zip(range(100), repeat(a), repeat(b), repeat(c)))
pool.close()
pool.join()
So How can I user tqdm to show the pregress?