cancellation_token_source Class

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.
This topic has not yet been rated - Rate this topic
Visual Studio 2012

The cancellation_token_source class represents the ability to cancel an operation.

class cancellation_token_source;

Name

Description

cancellation_token_source::cancellation_token_source Constructor

Overloaded. Constructs a cancellation_token_source object.

cancellation_token_source::~cancellation_token_source Destructor

Destructs the cancellation_token_source object.

Name

Description

cancellation_token_source::cancel Method

Cancels the token source and all the tokens associated with it.

cancellation_token_source::create_linked_source Method

Overloaded. Creates a cancellation_token_source which will be canceled when an input token is canceled.

cancellation_token_source::get_token Method

Returns a cancellation_token associated with this source.

Name

Description

cancellation_token_source::operator!= Operator

Determines whether two cancellation_token_source objects represent two different token sources.

cancellation_token_source::operator= Operator

Overloaded. Replaces the contents of one cancellation_token_source object with another.

cancellation_token_source::operator== Operator

Determines whether two cancellation_token_source objects represent the same token source.

cancellation_token_source can be used to request cancellation of a cancelable operation.

Use the cancel method to set all cancellation_token objects that are associated with this cancellation_token_source as canceled.

cancellation_token_source behaves like a smart pointer and is safe to pass around by value.

cancellation_token_source

Header: ppl.h

Namespace: concurrency

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.