The cancellation_token_source class represents the ability to cancel some cancelable operation.
Overloaded. Constructs a new cancellation_token_source. The source can be used to flag cancellation of some cancelable operation.
Cancels the token. Any task_group, structured_task_group, or task which utilizes the token will be canceled upon this call and throw an exception at the next interruption point.
Overloaded. Creates a cancellation_token_source which is canceled when the provided token is canceled.
Returns a cancellation token associated with this source. The returned token can be polled for cancellation or provide a callback if and when cancellation occurs.