@ExperimentalCoroutinesApi fun <T> flux(
context: CoroutineContext = EmptyCoroutineContext,
block: suspend ProducerScope<T>.() -> Unit
Creates cold reactive Flux that runs a given block in a coroutine.
Every time the returned flux is subscribed, it starts a new coroutine in the specified context.
Coroutine emits items with
send. Unsubscribing cancels running coroutine.
send are suspended appropriately when subscribers apply back-pressure and to ensure that
onNext is not invoked concurrently.
|Coroutine action||Signal to subscriber|
|Normal completion or
|Failure with exception or
Note: This is an experimental api. Behaviour of publishers that work as children in a parent scope with respect to cancellation and error handling may change in the future.