await

suspend fun <T> Task<T>.await(): Result<T>

Awaits this task without ever throwing: success, failure and cancellation all arrive as a Result, the last as a failure carrying TaskCancellation.

Cancelling the awaiting coroutine abandons the result, it does not stop the task — Task has no cancel of its own.