Standard interface for objects supporting a task that may be aborted or stopped prior to destruction.

interface Cancellable {
    cancel(): void;
}

Methods

Methods

  • Stop the object's primary activity. This should result in termination as quickly as possible.

    Cancellation have no effect if the object is cancelled or otherwise in a state where cancellation is irrelevant.

    Returns void