python - 我需要等待 ThreadPoolExecutor 完成吗?
问题描述
我正在使用 aconcurrent.futures.ThreadPoolExecutor
来保存一堆缓存文件:
with concurrent.futures.ThreadPoolExecutor() as e:
e.map(save, cache)
在从函数返回之前我是否需要“等待”它?还是会在后台自行完成?
解决方案
推荐阅读
- javascript - 正则表达式模式不会整理 YouTube 网址
- openssl - (带有 ECDSA 证书的 TLS)握手失败,因为没有共享密码
- node.js - 使用 react + nodejs 上传图片
- xml - 使用 DataContractSerializer 的接口中的显式类型
- sql - sql server如何查询最后一件商品的售出日期
- prolog - 如何在prolog中将相同的变量绑定在一起
- php - WooCommerce 自定义结帐复选框字段验证一个必填复选框
- php - PHP FPM + nginx 日志记录
- python - 为什么我们需要在多维标签的情况下划分损失?
- javascript - 如何使用角度一次从firebase读取和更新多个文档