https://kotlinlang.org logo
#coroutines
Title
# coroutines
p

Pitel

07/22/2021, 6:50 AM
What's the difference between parameter
block: suspend () -> T
and
block: suspend CoroutineScope.() -> T
?
e

ephemient

07/22/2021, 6:56 AM
IMO: just use
block: suspend () -> T
, as it conventionally implies that the block has "completed" when it returns
block: CoroutineScope.() -> Deferred<T>
(non-
suspend
) would be pretty equivalent but less convenient
3 Views