载入中...
搜索中...
未找到
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()

virtual eve::caps::IAsyncWorkExecutor::~IAsyncWorkExecutor ( )
virtualdefault

I async work executor.

成员函数说明

◆ submit()

virtual eve::Result< void > eve::caps::IAsyncWorkExecutor::submit ( std::function< void()>  work)
pure virtual

Queue work for a worker thread (or run it inline).

参数
workCallable that owns all data it needs; invoked at most once.
返回
Applied when queued or executed; Rejected/Failed when the pool cannot accept work. A successful result does not mean work has finished. @ownership work is 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 invoke work on a worker or, when no pool exists, on the caller. @reentrancy work must not call submit() on the same executor in a way that requires the submitting thread to drain the pool.

类成员变量说明

◆ capabilityName

constexpr const char* eve::caps::IAsyncWorkExecutor::capabilityName = "IAsyncWorkExecutor"
staticconstexpr

在文件 AsyncWork.h 第 28 行定义.


该类的文档由以下文件生成: