cancellation_token Class
The cancellation_token class represents the ability to determine whether some operation has been requested to cancel. A given token can be associated with a task_group, structured_task_group, or task to provide implicit cancellation. It can also be polled for cancellation or have a callback registered for if and when the associated cancellation_token_source is canceled.
class cancellation_token;
Members
Public Constructors
Name |
Description |
---|---|
Public Methods
Name |
Description |
---|---|
Removes a callback previously registered via the register method based on the cancellation_token_registration object returned at the time of registration. |
|
Returns an indication of whether this token can be canceled or not. |
|
Returns true if the token has been canceled. |
|
Returns a cancellation token which can never be subject to cancellation. |
|
Registers a callback function with the token. If and when the token is canceled, the callback will be made. Note that if the token is already canceled at the point where this method is called, the callback will be made immediately and synchronously. |
Public Operators
Name |
Description |
---|---|
Inheritance Hierarchy
cancellation_token
Requirements
Header: pplcancellation_token.h
Namespace: concurrency