asFlowable

fun <T : Any> Flow<T>.asFlowable(context: CoroutineContext = EmptyCoroutineContext): Flowable<T>(source)

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

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.