Coroutines

Hi. I’m new to Kotlin and I have a question. I need to execute a function n times in parallel, short circuit when any of the execution returns true(for an or pipeline) or false(for an and pipeline). I was trying to do this with async await. Basically inside the async I am cancelling the current coroutine if the value if false for an and pipeline. But that just throws a cancellation exception and I lose the results from all the executions of the function which have completed before the said cancellation.

Help

submitted by /u/bitchface-hatchling
[link] [comments]