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

Bundle of optional knobs accepted by tracked task-posting APIs. 更多...

#include <task_handle.h>

vlink::PostTaskOptions 的协作图:

Public 属性

CancellationToken cancellation_token
 Parent cancellation token that can request abort of this submission. 更多...
 
TaskOverflowPolicy overflow_policy {TaskOverflowPolicy::kUseDispatcherStrategy}
 Queue-full strategy applied to this single submission. 更多...
 
TaskDropPolicy drop_policy {TaskDropPolicy::kDroppable}
 Whether the dispatcher is permitted to drop this task to make room for newer work. 更多...
 

详细描述

Bundle of optional knobs accepted by tracked task-posting APIs.

Every field has a safe default so a default-constructed PostTaskOptions matches the dispatcher's behaviour for an unprotected, non-cancellable task.

类成员变量说明

◆ cancellation_token

CancellationToken vlink::PostTaskOptions::cancellation_token

Parent cancellation token that can request abort of this submission.

An empty token (the default) means only the handle's own cancellation_token() may request cancellation. When the supplied parent is already cancelled at submission time the returned handle is immediately marked TaskExecutionState::kCancelled. Cancellation observed while the task is queued causes the task to be skipped on dequeue.

◆ drop_policy

TaskDropPolicy vlink::PostTaskOptions::drop_policy {TaskDropPolicy::kDroppable}

Whether the dispatcher is permitted to drop this task to make room for newer work.

◆ overflow_policy

TaskOverflowPolicy vlink::PostTaskOptions::overflow_policy {TaskOverflowPolicy::kUseDispatcherStrategy}

Queue-full strategy applied to this single submission.


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