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
| using eve::editing::TaskService::Work = std::function<TaskOutcome(const TaskContext&)> |
在文件 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]
|
delete |
成员函数说明
◆ cancel()
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=()
|
delete |
◆ snapshot()
| Result< TaskSnapshot > eve::editing::TaskService::snapshot | ( | const TaskId & | task | ) | const |
◆ submit()
Queue background work and return its stable task identity.
在文件 EditingTaskService.cpp 第 40 行定义.
被这些函数引用 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.
该类的文档由以下文件生成:
- src/modules/editing/EditingTaskService.h
- src/modules/editing/EditingTaskService.cpp