from tqdm import tqdm
from time import sleep
from threading import Thread
def jindu():
for i in tqdm(range(11)):
sleep(0.1)
tasks = [1,2]
threads = []
for task in tasks:
t = Thread(target=jindu)
t.start()
threads.append(t)
for t in threads:
t.join()
如果 tasks = [1],单线程执行,进度条显示正常,
tasks = [1,2] 多线程执行就这样的,应该采用什么方法,让一个进度条对应一个线程,不会一直刷新打印新的进度跳