VLink  2.0.0
A high-performance communication middleware
vlink::Schedule结构体 参考final

Non-instantiable container for task-scheduling types and the process() entry points. 更多...

#include <schedule.h>

vlink::Schedule 的协作图:

struct  Config
 Scheduling parameters captured at the call to exec_task(). 更多...
 
class  RetStatus
 RAII handle returned by exec_task() when the wrapped callback returns bool. 更多...
 
class  Status
 RAII handle returned by exec_task() when the wrapped callback returns void. 更多...
 

Public 类型

using Callback = MoveFunction< void()>
 Callback signature for void tasks and lifecycle hooks. 更多...
 
using RetCallback = MoveFunction< bool()>
 Callback signature for tasks that return a boolean indicating success. 更多...
 
using CatchCallback = MoveFunction< void(std::exception &)>
 Callback signature for exception handlers attached via on_catch(). 更多...
 

Public 成员函数

 Schedule ()=delete
 
 Schedule (const Schedule &)=delete
 
Scheduleoperator= (const Schedule &)=delete
 
 Schedule (Schedule &&)=delete
 
Scheduleoperator= (Schedule &&)=delete
 

静态 Public 成员函数

static Status process (const Config &config, Callback &&callback, Callback &wrapper_callback)
 Wraps a void callback in a Config envelope and produces the task wrapper for the dispatcher. 更多...
 
static RetStatus process_with_ret (const Config &config, RetCallback &&callback, Callback &wrapper_callback)
 Wraps a bool-returning callback in a Config envelope and produces the task wrapper for the dispatcher. 更多...
 

详细描述

Non-instantiable container for task-scheduling types and the process() entry points.

Provides the Config envelope, the Status / RetStatus handles, and the process / process_with_ret static functions used by MessageLoop::exec_task().

成员类型定义说明

◆ Callback

Callback signature for void tasks and lifecycle hooks.

◆ CatchCallback

using vlink::Schedule::CatchCallback = MoveFunction<void(std::exception&)>

Callback signature for exception handlers attached via on_catch().

◆ RetCallback

Callback signature for tasks that return a boolean indicating success.

构造及析构函数说明

◆ 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]

Schedule& vlink::Schedule::operator= ( const Schedule )
delete

◆ operator=() [2/2]

Schedule& vlink::Schedule::operator= ( Schedule &&  )
delete

◆ process()

static Status vlink::Schedule::process ( const Config config,
Callback &&  callback,
Callback wrapper_callback 
)
static

Wraps a void callback in a Config envelope and produces the task wrapper for the dispatcher.

Called internally by MessageLoop::exec_task(). Allocates the Status state and fills wrapper_callback with the closure that the dispatcher will eventually run.

参数
configScheduling configuration.
callbackVoid callable to execute.
wrapper_callbackOut parameter receiving the dispatcher-ready wrapper.
返回
Fresh Status handle for fluent chaining.
这是这个函数的调用关系图:

◆ process_with_ret()

static RetStatus vlink::Schedule::process_with_ret ( const Config config,
RetCallback &&  callback,
Callback wrapper_callback 
)
static

Wraps a bool-returning callback in a Config envelope and produces the task wrapper for the dispatcher.

Called internally by MessageLoop::exec_task(). Allocates the RetStatus state and fills wrapper_callback with the closure that the dispatcher will eventually run.

参数
configScheduling configuration.
callbackBool-returning callable to execute.
wrapper_callbackOut parameter receiving the dispatcher-ready wrapper.
返回
Fresh RetStatus handle for fluent chaining.
这是这个函数的调用关系图:

该结构体的文档由以下文件生成: