joinFirst

suspend fun Iterable<Job>.joinFirst(scope: CoroutineScope, cancelOthers: Boolean = true): Job(source)

Trying to Job.join on all thiss. The first Job completed its work will interrupt all others joins and, if cancelOthers passed as true (by default), will also cancel all the others Jobs

Parameters

scope

Will be used to create CoroutineScope.LinkedSupervisorScope and launch joining of all Jobs in it


suspend fun Iterable<Job>.joinFirst(cancelOthers: Boolean = true): Job(source)

Trying to Job.join on all thiss. The first Job completed its work will interrupt all others joins and, if cancelOthers passed as true (by default), will also cancel all the others Jobs

Creates CoroutineScope using coroutineContext for internal purposes


suspend fun joinFirst(vararg jobs: Job, scope: CoroutineScope, cancelOthers: Boolean = true): Job(source)

Trying to Job.join on all jobs. The first Job completed its work will interrupt all others joins and, if cancelOthers passed as true (by default), will also cancel all the others Jobs

Parameters

scope

Will be used to create CoroutineScope.LinkedSupervisorScope and launch joining of all Jobs in it


suspend fun joinFirst(vararg jobs: Job, cancelOthers: Boolean = true): Job(source)

Trying to Job.join on all jobs. The first Job completed its work will interrupt all others joins and, if cancelOthers passed as true (by default), will also cancel all the others Jobs

Creates CoroutineScope using coroutineContext for internal purposes