File tree 1 file changed +10
-2
lines changed
kotlinx-coroutines-core/common/src/channels
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,16 @@ public fun <E> CoroutineScope.produce(
100
100
}
101
101
102
102
/* *
103
- * @suppress **This an internal API and should not be used from general code.**
104
- * onCompletion parameter will be redesigned.
103
+ * This an internal API and should not be used from general code.**
104
+ * onCompletion parameter will be redesigned.
105
+ * If you have to use `onCompletion` operator, please report to https://github.com/Kotlin/kotlinx.coroutines/issues/.
106
+ * As a temporary solution, [invokeOnCompletion][Job.invokeOnCompletion] can be used instead:
107
+ * ```
108
+ * fun <E> ReceiveChannel<E>.myOperator(): ReceiveChannel<E> = GlobalScope.produce(Dispatchers.Unconfined) {
109
+ * coroutineContext[Job]?.invokeOnCompletion { consumes() }
110
+ * }
111
+ * ```
112
+ * @suppress
105
113
*/
106
114
@InternalCoroutinesApi
107
115
public fun <E > CoroutineScope.produce (
You can’t perform that action at this time.
0 commit comments