InterruptionToken class

InterruptionToken class

This class represents the token to use for signaling long running tasks whether the interruption was requested.

The InterruptionToken type exposes the following members:

Properties

PropertyDescription
noneRepresents an empty interruption token.
Long-running operations will never be interrupted via InterruptionTokenSource.interrupt
when using this token.
is_interruption_requestedReturns bool.true if interruption was requested.

Methods

MethodDescription
throw_if_interruption_requestedThrows an OperationCanceledException if
interruption was requested.

See Also