TCancellationOrigin

The origin of a cancellation request, which provides a way to actually trigger it.

This design allows operations to pass the TCancellation on to sub-tasks, while making sure that the cancellation can only be triggered by the »outermost« instance waiting for the result.

Constructors

this
this()
Undocumented in source.

Members

Functions

throwIfTriggered
void throwIfTriggered()
Undocumented in source. Be warned that the author may not have intended to support it.
trigger
void trigger()

Triggers the cancellation request.

triggered
bool triggered()
Undocumented in source. Be warned that the author may not have intended to support it.
triggering
TAwaitable triggering()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From TCancellation

triggered
bool triggered()

Whether the cancellation request has been triggered.

throwIfTriggered
void throwIfTriggered()

Throws a TCancelledException if the cancellation request has already been triggered.

triggering
TAwaitable triggering()

A TAwaitable that can be used to wait for cancellation triggering.

Meta