asPublisher
fun <T> ReceiveChannel<T>.asPublisher(
context: CoroutineContext = DefaultDispatcher
): Publisher<T>
Converts a stream of elements received from the channel to the hot reactive publisher.
Every subscriber receives values from this channel in fan-out fashion. If the are multiple subscribers, they’ll receive values in round-robin way.
Parameters
context
- – the coroutine context from which the resulting observable is going to be signalled