vineethraj4902/13/2020, 7:59 PM
block: suspend () -> T
block: suspend CoroutineScope.() -> T
octylFractal02/13/2020, 8:02 PM
one and the
one -- and it's not clear which one will be used
, indicating that it's a normal suspend function that will actually suspend while doing work, or with
suspend () -> T
, which indicates that it will launch a separate coroutine that won't suspend this codepath. usually
CoroutineScope.() -> T
will contain some reference to the Job that was started in this case.
Evan R.02/13/2020, 8:04 PM
to launch its coroutines and therefore all launched coroutines in
are guaranteed to complete with that signature
louiscad02/15/2020, 8:04 AM
lambdas. If a custom function creates an inner scope as well, it's totally okay, it's totally to have the lambda(s) have that signature.