File tree 1 file changed +3
-2
lines changed
kotlinx-coroutines-core/common/src
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ public fun CoroutineScope.launch(
60
60
/* *
61
61
* Creates a coroutine and returns its future result as an implementation of [Deferred].
62
62
* The running coroutine is cancelled when the resulting deferred is [cancelled][Job.cancel].
63
+ * The resulting coroutine has a key difference compared with similar primitives in other languages
64
+ * and frameworks: it cancels the parent job (or outer scope) on failure to enforce *structured concurrency* paradigm.
65
+ * To change that behaviour, supervising parent ([SupervisorJob] or [supervisorScope]) can be used.
63
66
*
64
67
* Coroutine context is inherited from a [CoroutineScope], additional context elements can be specified with [context] argument.
65
68
* If the context does not have any dispatcher nor any other [ContinuationInterceptor], then [Dispatchers.Default] is used.
@@ -72,8 +75,6 @@ public fun CoroutineScope.launch(
72
75
* the resulting [Deferred] is created in _new_ state. It can be explicitly started with [start][Job.start]
73
76
* function and will be started implicitly on the first invocation of [join][Job.join], [await][Deferred.await] or [awaitAll].
74
77
*
75
- * @param context additional to [CoroutineScope.coroutineContext] context of the coroutine.
76
- * @param start coroutine start option. The default value is [CoroutineStart.DEFAULT].
77
78
* @param block the coroutine code.
78
79
*/
79
80
public fun <T > CoroutineScope.async (
You can’t perform that action at this time.
0 commit comments