@@ -12,7 +12,7 @@ import kotlin.coroutines.*
12
12
import kotlin.coroutines.intrinsics.*
13
13
14
14
/* *
15
- * Defines a scope for new coroutines. Every **coroutine builder** (like [launch], [async], etc)
15
+ * Defines a scope for new coroutines. Every **coroutine builder** (like [launch], [async], etc. )
16
16
* is an extension on [CoroutineScope] and inherits its [coroutineContext][CoroutineScope.coroutineContext]
17
17
* to automatically propagate all its elements and cancellation.
18
18
*
@@ -28,8 +28,8 @@ import kotlin.coroutines.intrinsics.*
28
28
* By convention, the [context of a scope][CoroutineScope.coroutineContext] should contain an instance of a
29
29
* [job][Job] to enforce the discipline of **structured concurrency** with propagation of cancellation.
30
30
*
31
- * Every coroutine builder (like [launch], [async], etc )
32
- * and every scoping function (like [coroutineScope], [withContext], etc ) provides _its own_ scope
31
+ * Every coroutine builder (like [launch], [async], and others )
32
+ * and every scoping function (like [coroutineScope] and [withContext]) provides _its own_ scope
33
33
* with its own [Job] instance into the inner block of code it runs.
34
34
* By convention, they all wait for all the coroutines inside their block to complete before completing themselves,
35
35
* thus enforcing the structured concurrency. See [Job] documentation for more details.
@@ -269,8 +269,8 @@ public suspend fun <R> coroutineScope(block: suspend CoroutineScope.() -> R): R
269
269
* Creates a [CoroutineScope] that wraps the given coroutine [context].
270
270
*
271
271
* If the given [context] does not contain a [Job] element, then a default `Job()` is created.
272
- * This way, cancellation or failure of any child coroutine in this scope cancels all the other children,
273
- * just like inside [coroutineScope] block.
272
+ * This way, failure of any child coroutine in this scope or [cancellation][CoroutineScope.cancel] of the scope itself
273
+ * cancels all the scope's children, just like inside [coroutineScope] block.
274
274
*/
275
275
@Suppress(" FunctionName" )
276
276
public fun CoroutineScope (context : CoroutineContext ): CoroutineScope =
0 commit comments