with Lifetime
suspend fun withLifetime(context: CoroutineContext = EmptyCoroutineContext, action: suspend CoroutineScope.(Lifetime) -> Unit)
The same as withContext, but creates a Lifetime that will be terminated only after the passed action and its CoroutineScope are completed
Throws
If the given context contains a Job.