cancel

abstract fun cancel(cause: Throwable? = null): Boolean(source)

Cancels this continuation with an optional cancellation cause. The result is true if this continuation was cancelled as a result of this invocation, and false otherwise. cancel might return false when the continuation was either resumed or already cancelled.