Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

cancellation_token_source Class

The cancellation_token_source class represents the ability to cancel some cancelable operation.

class cancellation_token_source;

Name

Description

cancellation_token_source::cancellation_token_source Constructor

Overloaded. Constructs a new cancellation_token_source. The source can be used to flag cancellation of some cancelable operation.

cancellation_token_source::~cancellation_token_source Destructor

Name

Description

cancellation_token_source::cancel Method

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.

cancellation_token_source::create_linked_source Method

Overloaded. Creates a cancellation_token_source which is canceled when the provided token is canceled.

cancellation_token_source::get_token Method

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.

cancellation_token_source

Header: pplcancellation_token.h

Namespace: concurrency

Show:
© 2014 Microsoft