Pool 类
Pool 是可调整数量的 Worker 的容器和控制器。Pool 化可以提供 Worker 功能的更高级别抽象,包括以线程要求的方式管理引用。
类概要
函数列表
函数 | 描述 |
---|---|
Pool::construct() | 创建新的 Pool of Worker。 |
Pool::collect() | 收集对已完成任务的引用。 |
Pool:: resize() | 调整 Pool 的大小。 |
Pool::shutdown() | 关闭所有 worker。 |
Pool::submit() | 提交对象进行执行。 |
Pool::submitTo() | 将任务提交到特定 worker 执行。 |