cancel

suspend fun cancel(taskId: String)

Emits TaskState.Cancelled for the given task ID and removes any stored events.