@@ -111,15 +111,15 @@ private class PublisherCoroutine<in T>(
111
111
}
112
112
113
113
/*
114
- This code is not trivial because of the two properties:
115
- 1. It ensures conformance to the reactive specification that mandates that onXXX invocations should not
116
- be concurrent. It uses Mutex to protect all onXXX invocation and ensure conformance even when multiple
117
- coroutines are invoking `send` function.
118
- 2. Normally, `onComplete/onError` notification is sent only when coroutine and all its children are complete.
119
- However, nothing prevents `publish` coroutine from leaking reference to it send channel to some
120
- globally-scoped coroutine that is invoking `send` outside of this context. Without extra precaution this may
121
- lead to `onNext` that is concurrent with `onComplete/onError`, so that is why signalling for
122
- `onComplete/onError` is also done under the same mutex.
114
+ * This code is not trivial because of the two properties:
115
+ * 1. It ensures conformance to the reactive specification that mandates that onXXX invocations should not
116
+ * be concurrent. It uses Mutex to protect all onXXX invocation and ensure conformance even when multiple
117
+ * coroutines are invoking `send` function.
118
+ * 2. Normally, `onComplete/onError` notification is sent only when coroutine and all its children are complete.
119
+ * However, nothing prevents `publish` coroutine from leaking reference to it send channel to some
120
+ * globally-scoped coroutine that is invoking `send` outside of this context. Without extra precaution this may
121
+ * lead to `onNext` that is concurrent with `onComplete/onError`, so that is why signalling for
122
+ * `onComplete/onError` is also done under the same mutex.
123
123
*/
124
124
125
125
// assert: mutex.isLocked()
0 commit comments