fastdo  0.5.12
winux::ThreadGroup类 参考

线程组 更多...

#include <threads.hpp>

Public 成员函数

 ThreadGroup ()
 构造函数1 默认 更多...
 
template<typename _Fx , typename... _ArgType>
 ThreadGroup (int count, _Fx fn, _ArgType &&...arg)
 构造函数2 提供一个线程处理例程,并指定创建的线程数量 更多...
 
virtual ~ThreadGroup ()
 
 ThreadGroup (ThreadGroup &&other)
 
ThreadGroupoperator= (ThreadGroup &&other)
 
ThreadGroupdestroy ()
 销毁所有线程 更多...
 
template<typename _Fx , typename... _ArgType>
ThreadGroupcreate (int count, _Fx fn, _ArgType &&...arg)
 按指定的线程处理例程,创建一定数量的线程 更多...
 
template<class _ThreadCls >
ThreadGroupcreate (int count)
 创建一定数量指定的派生类线程 更多...
 
ThreadGroupstartup ()
 启动已经创建的线程 更多...
 
bool wait (double sec=-1)
 等待所有线程运行完毕 更多...
 

详细描述

线程组

管理一组线程,它们有相同的线程处理例程

在文件 threads.hpp425 行定义.

构造及析构函数说明

winux::ThreadGroup::ThreadGroup ( )
inline

构造函数1 默认

在文件 threads.hpp430 行定义.

template<typename _Fx , typename... _ArgType>
winux::ThreadGroup::ThreadGroup ( int  count,
_Fx  fn,
_ArgType &&...  arg 
)
inline

构造函数2 提供一个线程处理例程,并指定创建的线程数量

在文件 threads.hpp436 行定义.

virtual winux::ThreadGroup::~ThreadGroup ( )
inlinevirtual

在文件 threads.hpp447 行定义.

winux::ThreadGroup::ThreadGroup ( ThreadGroup &&  other)
inline

在文件 threads.hpp451 行定义.

成员函数说明

template<typename _Fx , typename... _ArgType>
ThreadGroup& winux::ThreadGroup::create ( int  count,
_Fx  fn,
_ArgType &&...  arg 
)
inline

按指定的线程处理例程,创建一定数量的线程

在文件 threads.hpp474 行定义.

template<class _ThreadCls >
ThreadGroup& winux::ThreadGroup::create ( int  count)
inline

创建一定数量指定的派生类线程

在文件 threads.hpp490 行定义.

ThreadGroup& winux::ThreadGroup::destroy ( )

销毁所有线程

ThreadGroup& winux::ThreadGroup::operator= ( ThreadGroup &&  other)
inline

在文件 threads.hpp455 行定义.

ThreadGroup& winux::ThreadGroup::startup ( )

启动已经创建的线程

bool winux::ThreadGroup::wait ( double  sec = -1)

等待所有线程运行完毕

返回false表示超时,返回true表示运行线程全部正常退出


该类的文档由以下文件生成: