Options
All
  • Public
  • Public/Protected
  • All
Menu

A source for generating CancellationTokens. First create a CancellationTokenSource, then using the token property to obtain the cancellation token. The token can be cancelled by calling cancel() on the CancellationTokenSource.

Hierarchy

  • CancellationTokenSource

Index

Constructors

Methods

Constructors

constructor

Methods

cancel

  • cancel(): void
  • Cancels the CancellationToken, setting isCancellationRequested to true, and invoking any registered listeners.

    Returns void

dispose

  • dispose(): void
  • Removes subscriptions that were created using register().

    Returns void

token

  • Gets the cancellation token.

    Returns CancellationToken

Static none

  • Creates a CancellationToken that does nothing.

    Returns CancellationToken