is there something like list-of-jobs.joinAllOrThro...
# announcements
p
is there something like list-of-jobs.joinAllOrThrowOnFirstExceptionWhateverHappensFirst?
m
Just launch all jobs inside a
coroutineScope { … }
. It will automatically wait until all Jobs are completed or throw on first job failure.
☝️ 1
p
coroutineScope { repeat(100) { launch { …. one job of many }}} // --> will automatically have this behavior?
m
Yes
s
and the first exception will also cancel all the other coroutines you started. Structured concurrency for the win 😎
👍 1
p
thank you very much stephan (or probably “Vielen Dank” since your name sounds German)
and thanks Marc