NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
task_group结构体 参考

任务组 更多...

#include <thread_pool.hpp>

Public 成员函数

void increment () noexcept
 增加运行计数
void decrement () noexcept
 减少运行计数
void wait () const noexcept
 等待组内所有任务完成

Public 属性

atomic< size_trunning_count {0}
 正在运行的任务计数

详细描述

任务组

用于跟踪一组任务的执行状态,可以等待组内所有任务完成。 支持任务的嵌套分组。

在文件 thread_pool.hpp40 行定义.

成员函数说明

◆ decrement()

void task_group::decrement ( )
inlinenoexcept

减少运行计数

当计数变为0时,通知所有等待的线程。

在文件 thread_pool.hpp56 行定义.

引用了 memory_order_release , 以及 running_count.


该结构体的文档由以下文件生成: