在使用as_completed时,应该将其放在一个for循环中,而不是直接调用。因此,应该将代码修改为:

for future in as_completed(futures, timeout=60): try: future.result() except Exception as e: print(e)

哪里有错误for future in as_completedfutures timeout=60 File CProgram FilesPython310libconcurrentfutures_basepy line 241 in as_completed raise TimeoutErrorconcurrentfutures_baseTimeoutError 65287 of 657

原文地址: http://www.cveoy.top/t/topic/hw3c 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录