|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
高性能线程池的实现 更多...
类 | |
| struct | task_group |
| 任务组 更多... | |
| class | local_queue |
| 线程本地任务队列 更多... | |
| struct | worker_context |
| 工作线程上下文 更多... | |
| struct | task_info |
| 任务信息 更多... | |
| struct | submit_result< T > |
| 任务提交结果 更多... | |
| class | thread_pool |
| 线程池类 更多... | |
函数 | |
| NEFORCE_API worker_context *& | get_worker_context () noexcept |
| 获取当前线程的工作线程上下文 | |
| NEFORCE_API shared_ptr< task_group > & | get_current_task_group () noexcept |
| 获取当前线程的任务组 | |
高性能线程池的实现
|
noexcept |
获取当前线程的任务组
引用了 apply(), task_info::completed, priority_queue< T, Sequence, Compare >::emplace(), unordered_map< Key, T, HashFcn, EqualKey, Alloc >::emplace(), vector< T, Alloc >::emplace_back(), task_info::failed, forward(), get_current_task_group(), get_worker_context(), worker_context::id, is_invocable_v, atomic< T >::load(), make_shared(), make_tuple(), make_unique(), memory_order_relaxed, memory_order_release, move(), condition_variable::notify_one(), timestamp::now(), priority(), vector< T, Alloc >::reserve(), task_info::running, priority_queue< T, Sequence, Compare >::size(), unordered_map< Key, T, HashFcn, EqualKey, Alloc >::size(), vector< T, Alloc >::size(), atomic< T >::store(), condition_variable::wait_for() , 以及 exception::what().
被这些函数引用 get_current_task_group().
|
noexcept |