载入中...
搜索中...
未找到
eve::caps::IAsyncWorkExecutor类 参考abstract
Fire-and-forget CPU job submission used by the resource cache. 更多...
#include <AsyncWork.h>
Public 成员函数 | |
| virtual | ~IAsyncWorkExecutor ()=default |
| I async work executor. | |
| virtual eve::Result< void > | submit (std::function< void()> work)=0 |
Queue work for a worker thread (or run it inline). | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "IAsyncWorkExecutor" |
详细描述
Fire-and-forget CPU job submission used by the resource cache.
Workers must not touch the Squirrel VM, Vulkan device, or Resource::adopt. They may call IAssetReloader::load() and insert into ResourceManager.
在文件 AsyncWork.h 第 26 行定义.
构造及析构函数说明
◆ ~IAsyncWorkExecutor()
|
virtualdefault |
I async work executor.
成员函数说明
◆ submit()
|
pure virtual |
Queue work for a worker thread (or run it inline).
- 参数
-
work Callable that owns all data it needs; invoked at most once.
- 返回
Appliedwhen queued or executed;Rejected/Failedwhen the pool cannot accept work. A successful result does not meanworkhas finished. @ownershipworkis taken by the executor for the lifetime of the job. @lifetime The callable must not capture pointers that die before the job completes; ResourceManager keeps cache/pending state alive. @thread Safe to call from the game thread; the executor may invokeworkon a worker or, when no pool exists, on the caller. @reentrancyworkmust not callsubmit()on the same executor in a way that requires the submitting thread to drain the pool.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 AsyncWork.h 第 28 行定义.
该类的文档由以下文件生成:
- src/engine/common/AsyncWork.h