File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
kotlinx-coroutines-core/common/src Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,15 @@ public fun SupervisorJob0(parent: Job? = null) : Job = SupervisorJob(parent)
4242 * Creates a [CoroutineScope] with [SupervisorJob] and calls the specified suspend block with this scope.
4343 * The provided scope inherits its [coroutineContext][CoroutineScope.coroutineContext] from the outer scope, but overrides
4444 * context's [Job] with [SupervisorJob].
45+ * This function returns as soon as the given block and all its child coroutines are completed.
4546 *
46- * A failure of a child does not cause this scope to fail and does not affect its other children,
47- * so a custom policy for handling failures of its children can be implemented. See [SupervisorJob] for details.
48- * A failure of the scope itself (exception thrown in the [block] or cancellation) fails the scope with all its children,
47+ * Unlike [coroutineScope], a failure of a child does not cause this scope to fail and does not affect its other children,
48+ * so a custom policy for handling failures of its children can be implemented. See [SupervisorJob] for additional details.
49+ * A failure of the scope itself (exception thrown in the [block] or external cancellation) fails the scope with all its children,
4950 * but does not cancel parent job.
51+ *
52+ * The method may throw a [CancellationException] if the current job was cancelled externally,
53+ * or rethrow an exception thrown by the given [block].
5054 */
5155public suspend fun <R > supervisorScope (block : suspend CoroutineScope .() -> R ): R {
5256 contract {
You can’t perform that action at this time.
0 commit comments