System::Threading::CancellationTokenRegistration class

CancellationTokenRegistration class

Represents a registration for a cancellation token callback.

class CancellationTokenRegistration

Methods

MethodDescription
Dispose()Disposes the registration and removes the callback from the associated CancellationTokenSource. After calling this method, the registered callback will no longer be invoked when the associated CancellationTokenSource is canceled.

Remarks

This class allows for the deregistration of a callback from a cancellation token. When disposed, it removes the callback from the associated CancellationTokenSource. This class should not be created directly - it is returned by CancellationToken registration methods.

See Also