当前位置:
首页 >
在使用 python 封装的进程池 from concurrent.futures import ProcessPoolExecutor 遇到的问题
发布时间:2023/11/30
61
豆豆
生活随笔
收集整理的这篇文章主要介绍了
在使用 python 封装的进程池 from concurrent.futures import ProcessPoolExecutor 遇到的问题
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
这样可以正常运行,
但是将代码移植到 mac系统, 用的是python3.7
就报错:
于是就把processpool.shutdown(wait=False) 这个注掉,把这个语句放在 整个程序的最后,
以上错误没再出现, 但是出现别的错误了,
尝试改为:processpool.shutdown(wait=True), 就好了,
同事说,python3.7 的 ProcessPoolExecutor的shutdown 方法有所修改,关闭了某些东西,另外这种
shutdown的方式 也不太友好, 这里先记录以下, 等找到原因 再回来进行补充!!!
总结
以上是生活随笔为你收集整理的在使用 python 封装的进程池 from concurrent.futures import ProcessPoolExecutor 遇到的问题的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 急急急!!问一下,神雕侠侣师徒之间要多少
- 下一篇: python 异步与io