[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a collection of parallel work which can be waited upon or canceled.
Public Constructors
Public Methods
Name | Description |
|---|
task_group::cancel Method | Makes a best effort attempt to cancel the sub-tree of work rooted at this task group. Every work item scheduled upon the task group will get canceled transitively if possible. |
task_group::is_canceling Method | Informs the caller whether or not the task group is currently in the midst of a cancellation. Note that this does not necessarily indicate that cancel was called on the group (although such certainly qualifies this function to return true). It may be the case that the task group is executing inline and a task group further up in the work tree was canceled. In cases such as these where we can determine ahead of time that cancellation will flow through this group, true will be returned as well. |
task_group::run Method | Overloaded. |
task_group::run_and_wait Method | Overloaded. Schedules a work item to be run inline with the assistance of the task_group for full cancellation support. The caller manages lifetime of the all objects. Then wait until all work on the task_group has completed or is canceled. Once the wait has returned, the structured_task_group is considered in a final state and should not be used. |
task_group::wait Method | Waits until all work on the task_group has completed or is canceled. Calling this has the effect of resetting the task group to a clean state where it can be reused (including after cancellation). |
For more information, see Task Parallelism.
Concurrency::task_group
Header: ppl.h
Reference