|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
任务信息 更多...
#include <thread_pool.hpp>
Public 类型 | |
| enum class | status { pending , running , completed , failed } |
| 任务状态枚举 更多... | |
Public 成员函数 | |
| task_info (const uint64_t task_id, const priority_type priority) | |
| 构造函数 | |
| NEFORCE_NODISCARD bool | is_finished () const noexcept |
| 检查任务是否已完成 | |
| NEFORCE_NODISCARD int64_t | exec_time () const noexcept |
| 获取任务执行时间 | |
Public 属性 | |
| const uint64_t | id |
| 任务ID | |
| atomic< status > | status {status::pending} |
| 任务状态 | |
| timestamp | submit_time {timestamp::now()} |
| 提交时间 | |
| timestamp | start_time {0} |
| 开始执行时间 | |
| timestamp | finish_time {0} |
| 完成时间 | |
| uint32_t | worker_thread_id {0} |
| 执行任务的线程ID | |
| string | error {} |
| 错误信息 | |
| priority_type | priority |
| 任务优先级 | |
|
strong |
|
inlineexplicit |
|
inlinenoexcept |
|
inlinenoexcept |
检查任务是否已完成
在文件 thread_pool.hpp 第 260 行定义.
引用了 completed, failed , 以及 memory_order_acquire.