Davio
10/09/2024, 7:42 AMAlejandro Serrano.Mena
10/09/2024, 7:56 AMawait
on the first one, and only if that one is null
awaiting the rest would work)Davio
10/09/2024, 8:04 AMDavio
10/09/2024, 8:07 AMrunBlocking {
val regularJob = async<String?> { "hello" }
val fallbackJob = async { "world" }
val result = regularJob.await() ?: fallbackJob.await()
}
Alejandro Serrano.Mena
10/09/2024, 8:08 AM