Python_线程池
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=50) as e:
# 第一个down_img为函数,后面url_hour,file_dir,img_name为参数
e.submit(self.down_img, url_hour, file_dir, img_name)
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=50) as e:
# 第一个down_img为函数,后面url_hour,file_dir,img_name为参数
e.submit(self.down_img, url_hour, file_dir, img_name)