VLink  2.0.0
A high-performance communication middleware
vlink::PostTaskOptions Struct Referencefinal

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

#include <task_handle.h>

Collaboration diagram for vlink::PostTaskOptions:

Public Attributes

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

Detailed Description

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.

Member Data Documentation

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


The documentation for this struct was generated from the following file: