Share via


cancellation_token_registration Class

The cancellation_token_registration class represents a callback notification from a cancellation_token.

class cancellation_token_registration;

Members

Public Constructors

Name

Description

cancellation_token_registration::cancellation_token_registration Constructor

Overloaded. Constructs a cancellation_token_registration object.

cancellation_token_registration::~cancellation_token_registration Destructor

Destructs the cancellation_token_registration object.

Public Operators

Name

Description

cancellation_token_registration::operator!= Operator

Determines whether two cancellation_token_registration objects represent two different cancellation token registrations.

cancellation_token_registration::operator= Operator

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

cancellation_token_registration::operator== Operator

Determines whether two cancellation_token_registration objects represent the same cancellation token registration.

Remarks

When you use the register method on a cancellation_token to receive notification of when cancellation occurs, a cancellation_token_registration object is returned as a handle to the callback so that you can request a specific callback no longer be made through use of the deregister method.

The cancellation_token_registration behaves like a smart pointer and is safe and efficient to pass around by value.

Inheritance Hierarchy

cancellation_token_registration

Requirements

Header: ppl.h

Namespace: concurrency

See Also

Reference

concurrency Namespace