NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::thread_pool_executor结构体 参考

thread_pool 的轻量执行器适配器 更多...

#include <thread_pool.hpp>

Public 成员函数

void execute (function< void()> handler)
 提交 handler 到线程池
bool running_in_this_thread () const noexcept
 检查当前线程是否为线程池 worker

详细描述

thread_pool 的轻量执行器适配器

thread_pool 的 submit_task() 适配为 executor 接口。

在文件 thread_pool.hpp853 行定义.

成员函数说明

◆ execute()

void neforce::thread_pool_executor::execute ( function< void()> handler)
inline

提交 handler 到线程池

参数
handler要执行的 handler

在文件 thread_pool.hpp860 行定义.

引用了 neforce::move().

◆ running_in_this_thread()

bool neforce::thread_pool_executor::running_in_this_thread ( ) const
inlinenodiscardnoexcept

检查当前线程是否为线程池 worker

返回
在 worker 线程中返回 true

在文件 thread_pool.hpp866 行定义.

引用了 neforce::get_worker_context().


该结构体的文档由以下文件生成: