Sergey
parent.join()
parent.cancel() / parent.cancelAndJoin()
async {}
val parent = CoroutineScope(dispatcher).launch { ... val childRes0 = async { ... } val childRes1 = async { ... } ... } ... parent.cancelAndJoin()
kevin.cianfarini
NonCancellable
val parent = CoroutineScope(dispatcher).launch { ... withConttext(NonCancellable) { val childRes0 = async { ... } val childRes1 = async { ... } } ... } ... parent.cancelAndJoin()
coroutineScope
fun runManyChildren() = coroutineScope { vals.map { x -> async { .... } } } val parent = CoroutineScope(dispatcher).launch { ... withConttext(NonCancellable) { runManyChildren() } ... } ... parent.cancelAndJoin()
runManyChildren
uli
A modern programming language that makes developers happier.