asFlux

fun <T : Any> Flow<T>.asFlux(context: CoroutineContext = EmptyCoroutineContext): Flux<T>(source)

Converts the given flow to a cold flux. The original flow is cancelled when the flux subscriber is disposed.

This function is integrated with ReactorContext, see its documentation for additional details.

An optional context can be specified to control the execution context of calls to Subscriber methods. You can set a CoroutineDispatcher to confine them to a specific thread and/or various ThreadContextElement to inject additional context into the caller thread. By default, the Unconfined dispatcher is used, so calls are performed from an arbitrary thread.