NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
线程池

高性能线程池的实现 更多...

线程池 的协作图:

struct  neforce::task_group
 任务组 更多...
class  neforce::local_queue
 线程本地任务队列 更多...
struct  neforce::worker_context
 工作线程上下文 更多...
struct  neforce::task_info
 任务信息 更多...
struct  neforce::submit_result< T >
 任务提交结果 更多...
class  neforce::thread_pool
 线程池类 更多...

函数

worker_context *& neforce::get_worker_context () noexcept
 获取当前线程的工作线程上下文
shared_ptr< task_group > & neforce::get_current_task_group () noexcept
 获取当前线程的任务组

详细描述

高性能线程池的实现

函数说明

◆ get_current_task_group()

◆ get_worker_context()

worker_context *& neforce::get_worker_context ( )
noexcept

获取当前线程的工作线程上下文

返回
工作线程上下文指针

引用了 get_worker_context().

被这些函数引用 get_current_task_group(), get_worker_context() , 以及 neforce::thread_pool_executor::running_in_this_thread().