stop

abstract fun stop(cancel: Boolean)

Stops this task, moving it to an appropriate final state and potentially calling onFinish.

See canStart, onStart, onTick, and onFinish documentation for behavior details.

Parameters

cancel

if true or omitted, the task is cancelled; if false, the task completed normally

If this task is currently being processed, then this function throws TaskStopException.


open fun stop()

Stops this task, moving it the Cancelled state and potentially calling onFinish.

See canStart, onStart, onTick, and onFinish documentation for behavior details.

If this task is currently being processed, then this function throws TaskStopException.