共用方式為


structured_task_group::structured_task_group Constructor

Constructs a new structured_task_group object.

structured_task_group();

structured_task_group(
   cancellation_token _CancellationToken
);

Parameters

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

Remarks

The constructor that takes a cancellation token creates a structured_task_group that will be canceled when the source associated with the token is canceled. Providing an explicit cancellation token also isolates this structured 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

structured_task_group Class

Concepts

Task Parallelism (Concurrency Runtime)