12 2021 档案
摘要:python 自带线程池 from concurrent.futures import ThreadPoolExecutor, as_completed import time brand_list = ['xiaomi', 'apple', 'vivo', 'oppo', 'meizu', 'sa
阅读全文
摘要:超时跳过、接收子线程结果 方式一:eventlet 模块 缺点:针对子进程无法跳出 import time, eventlet eventlet.monkey_patch() with eventlet.Timeout(3, False): time.sleep(4) # 可能超时的代码块 prin
阅读全文