Non-constructible utility struct providing task scheduling primitives.
更多...
#include <schedule.h>
|
| using | Callback = std::function<void()> |
| | Callback type for void tasks and lifecycle hooks (schedule/execution timeout, else).
|
| using | RetCallback = std::function<bool()> |
| | Callback type for tasks that return a boolean result.
|
| using | CatchCallback = std::function<void(std::exception&)> |
| | Callback type invoked when an exception is caught inside the task.
|
Non-constructible utility struct providing task scheduling primitives.
Contains Config, Status, RetStatus, process() and process_with_ret(). Users interact with this struct primarily via MessageLoop::exec_task().
◆ Callback
Callback type for void tasks and lifecycle hooks (schedule/execution timeout, else).
◆ CatchCallback
Callback type invoked when an exception is caught inside the task.
◆ RetCallback
Callback type for tasks that return a boolean result.
◆ Schedule() [1/3]
| vlink::Schedule::Schedule |
( |
| ) |
|
|
delete |
◆ Schedule() [2/3]
| vlink::Schedule::Schedule |
( |
const Schedule & | | ) |
|
|
delete |
◆ Schedule() [3/3]
| vlink::Schedule::Schedule |
( |
Schedule && | | ) |
|
|
delete |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ process()
Wraps a void callback in a Config envelope and produces a wrapper task.
Called internally by MessageLoop::exec_task(). Creates the Status and populates wrapper_callback with the task wrapper ready to be posted to the queue.
- 参数
-
| config | Scheduling configuration. |
| callback | Void callable to execute. |
| wrapper_callback | Output: the wrapped task to be posted. |
- 返回
Status handle for chaining callbacks.
◆ process_with_ret()
Wraps a bool-returning callback in a Config envelope and produces a wrapper task.
Called internally by MessageLoop::exec_task(). Creates the RetStatus and populates wrapper_callback with the task wrapper ready to be posted to the queue.
- 参数
-
| config | Scheduling configuration. |
| callback | Bool-returning callable to execute. |
| wrapper_callback | Output: the wrapped task to be posted. |
- 返回
RetStatus handle for chaining callbacks.
该结构体的文档由以下文件生成: