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

df

11/22/2020, 6:55 PM
Why do all methods in the docs for producing functions extend CoroutineScope? Is that just a convention or does it serve a special purpose?
e

ephemient

11/22/2020, 7:10 PM
convention:
suspend fun
for functions that are logically "blocking" and wait for all work to complete before returning,
CoroutineScope
receiver or argument for functions which launch coroutines that continue running after the function's return
d

df

11/22/2020, 8:32 PM
thanks
3 Views