dave08
02/03/2019, 6:05 PMgetCompletedOrNull()
that returns a null instead of throwing... so currently the only way is to runCatching { deferred.getCompleted() }.getOrElse { defaultValue }
?altavir
02/03/2019, 6:56 PMisCompleted
insteadif(deferred.isCompleted()) getCompleted() else defaultValue
cbruegg
02/03/2019, 8:22 PMpoll
method: fun <T: Any> Deferred<T>.poll() = if (isCompleted) getCompleted() else null
dave08
02/03/2019, 8:26 PM