@@ -11,23 +11,24 @@ import org.reactivestreams.*
11
11
import reactor.core.*
12
12
import reactor.core.publisher.*
13
13
import reactor.util.context.*
14
+ import java.lang.IllegalArgumentException
14
15
import kotlin.coroutines.*
15
16
16
17
/* *
17
- * Creates cold reactive [Flux] that runs a given [block] in a coroutine.
18
+ * Creates a cold reactive [Flux] that runs a given [block] in a coroutine.
18
19
* Every time the returned flux is subscribed, it starts a new coroutine in the specified [context].
19
- * Coroutine emits ([Subscriber.onNext]) values with ` send` , completes ([Subscriber.onComplete])
20
- * when the coroutine completes or channel is explicitly closed and emits error ([Subscriber.onError])
21
- * if coroutine throws an exception or closes channel with a cause.
22
- * Unsubscribing cancels running coroutine.
20
+ * Coroutine emits ([Subscriber.onNext]) values with [ send][ProducerScope.send] , completes ([Subscriber.onComplete])
21
+ * when the coroutine completes, or the channel is explicitly closed and emits an error ([Subscriber.onError])
22
+ * if the coroutine throws an exception or closes the channel with a cause.
23
+ * Unsubscribing cancels the running coroutine.
23
24
*
24
- * Invocations of `send` are suspended appropriately when subscribers apply back-pressure and to ensure that
25
- * `onNext` is not invoked concurrently.
26
- *
27
- * Method throws [IllegalArgumentException] if provided [context] contains a [Job] instance.
25
+ * Invocations of [send][ProducerScope.send] are suspended appropriately when subscribers apply back-pressure and to
26
+ * ensure that [onNext][Subscriber.onNext] is not invoked concurrently.
28
27
*
29
28
* **Note: This is an experimental api.** Behaviour of publishers that work as children in a parent scope with respect
30
29
* to cancellation and error handling may change in the future.
30
+ *
31
+ * @throws IllegalArgumentException if the provided [context] contains a [Job] instance.
31
32
*/
32
33
@ExperimentalCoroutinesApi
33
34
public fun <T > flux (
0 commit comments