Cancellable

fun interface Cancellable(source)

A handle that stops the work it was returned from.

Every callback-based extension point returns one. Implementations must tolerate cancel being called more than once, and after the work has already finished.

Functions

Link copied to clipboard
abstract fun cancel()

Stops the work, if it has not already stopped. Idempotent.