Share via


task_group::task_group Constructor

Constructs a new task_group object.

task_group();

task_group(
   cancellation_token _CancellationToken
);

Parameters

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

Remarks

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

See Also

Reference

task_group Class

Concepts

Task Parallelism (Concurrency Runtime)