python线程池,多线程

logDebug(self.cfg_down_appdata, f"获取{lastId}的详情")
t_list = []
with ThreadPoolExecutor(10) as executor:
    for info in list_info:
        f = executor.submit(self.all_send_details, info)
        t_list.append(f)
        print('main thread running')

for future in as_completed(t_list):
    print(future.result())
posted @ 2020-06-24 09:46  莫贞俊晗  阅读(136)  评论(0编辑  收藏  举报