race

suspend fun <T> race(vararg actions: suspend () -> T): List<Result<T>>(source)

Starts every action at once on Dispatchers.Default and waits for all of them. The result of each action is in the same position of the returned list, a failure as Result.failure, so a test can check which side of a race won and that the loser failed the way it should.