task_group::task_group Constructor

 

Constructs a new task_group object.

task_group();

task_group(
   cancellation_token _CancellationToken
);

_CancellationToken

A cancellation token to associate with this task group. The task group will be canceled when the token is canceled.

The constructor that takes a cancellation token creates a task_group that will be canceled when the source associated with the token is canceled. Providing an explicit cancellation token also isolates this task group from participating in an implicit cancellation from a parent group with a different token or no token.

Requirements

Header: ppl.h

Namespace: concurrency

Show: