载入中...
搜索中...
未找到
eve::thread::Task类 参考

A job executed by a ThreadPool worker. Status strings (no enums): "pending" | "running" | "done" | "failed". 更多...

#include <Task.h>

Public 成员函数

 Task (std::function< void()> fn)
 
 ~Task ()
 
std::string getStatus () const
 
bool isDone () const
 
bool hasFailed () const
 
std::string getError () const
 
void wait ()
 Block until the task finishes (done or failed).
 
void run ()
 

友元

class ThreadPool
 

详细描述

A job executed by a ThreadPool worker. Status strings (no enums): "pending" | "running" | "done" | "failed".

在文件 Task.h16 行定义.

构造及析构函数说明

◆ Task()

eve::thread::Task::Task ( std::function< void()>  fn)
explicit

在文件 Task.cpp8 行定义.

引用了 fn.

◆ ~Task()

eve::thread::Task::~Task ( )
default

引用了 fn.

成员函数说明

◆ getError()

std::string eve::thread::Task::getError ( ) const

在文件 Task.cpp33 行定义.

◆ getStatus()

std::string eve::thread::Task::getStatus ( ) const

在文件 Task.cpp18 行定义.

◆ hasFailed()

bool eve::thread::Task::hasFailed ( ) const

在文件 Task.cpp28 行定义.

◆ isDone()

bool eve::thread::Task::isDone ( ) const

在文件 Task.cpp23 行定义.

◆ run()

void eve::thread::Task::run ( )

在文件 Task.cpp44 行定义.

引用了 run().

被这些函数引用 run().

◆ wait()

void eve::thread::Task::wait ( )

Block until the task finishes (done or failed).

在文件 Task.cpp38 行定义.

引用了 state.

友元及相关函数文档

◆ ThreadPool

friend class ThreadPool
friend

在文件 Task.h48 行定义.


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