载入中...
搜索中...
未找到
eve::editing::TaskService类 参考

Single-worker background queue shared by editor domains. 更多...

#include <EditingTaskService.h>

Public 类型

using Work = std::function< TaskOutcome(const TaskContext &)>
 

Public 成员函数

 TaskService ()
 Start the editor background worker.
 
 ~TaskService ()
 Cooperatively cancel pending work and join the worker.
 
 TaskService (const TaskService &)=delete
 
TaskService & operator= (const TaskService &)=delete
 
Result< TaskId > submit (std::string name, Work work)
 Queue background work and return its stable task identity.
 
Result< void > cancel (const TaskId &task)
 Request cooperative cancellation of queued or running work.
 
Result< TaskSnapshot > snapshot (const TaskId &task) const
 Return a thread-safe task snapshot.
 
Result< void > waitIdle (std::chrono::milliseconds timeout)
 Wait until no task is queued or running; intended for shutdown and tests.
 

详细描述

Single-worker background queue shared by editor domains.

Worker functions receive only immutable captures. State publication is synchronized and can be queried from the host/UI thread without callbacks into game objects from the worker.

在文件 EditingTaskService.h 第 62 行定义.

成员类型定义说明

◆ Work

在文件 EditingTaskService.h 第 64 行定义.

构造及析构函数说明

◆ TaskService() [1/2]

eve::editing::TaskService::TaskService ( )

Start the editor background worker.

在文件 EditingTaskService.cpp 第 25 行定义.

◆ ~TaskService()

eve::editing::TaskService::~TaskService ( )

Cooperatively cancel pending work and join the worker.

在文件 EditingTaskService.cpp 第 27 行定义.

◆ TaskService() [2/2]

eve::editing::TaskService::TaskService ( const TaskService &  )
delete

成员函数说明

◆ cancel()

Result< void > eve::editing::TaskService::cancel ( const TaskId &  task)

Request cooperative cancellation of queued or running work.

在文件 EditingTaskService.cpp 第 62 行定义.

引用了 eve::editing::Cancelled, eve::editing::Failed, found, eve::editing::Queued , 以及 eve::editing::Succeeded.

◆ operator=()

TaskService & eve::editing::TaskService::operator= ( const TaskService &  )
delete

◆ snapshot()

Result< TaskSnapshot > eve::editing::TaskService::snapshot ( const TaskId &  task) const

Return a thread-safe task snapshot.

在文件 EditingTaskService.cpp 第 79 行定义.

引用了 found.

◆ submit()

Result< TaskId > eve::editing::TaskService::submit ( std::string  name,
Work  work 
)

Queue background work and return its stable task identity.

在文件 EditingTaskService.cpp 第 40 行定义.

引用了 id , 以及 name.

被这些函数引用 eve::material_editing::MaterialEditorService::compileAsync().

◆ waitIdle()

Result< void > eve::editing::TaskService::waitIdle ( std::chrono::milliseconds  timeout)

Wait until no task is queued or running; intended for shutdown and tests.

在文件 EditingTaskService.cpp 第 88 行定义.

引用了 eve::Failed.


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