awaitCompleted

suspend fun Completable.awaitCompleted(): Unit

Awaits for completion of this completable without blocking a thread. Returns Unit or throws the corresponding exception if this completable had produced error.

This suspending function is cancellable. If the Job of the invoking coroutine is cancelled or completed while this suspending function is suspended, this function immediately resumes with CancellationException.