kotlin-flow-extensions / hu.akarnokd.kotlin.flow / kotlinx.coroutines.flow.Flow / multicast

multicast

@FlowPreview fun <T, R> Flow<T>.multicast(subjectProvider: () -> SubjectAPI<T>, transform: suspend (Flow<T>) -> Flow<R>): Flow<R>

Shares a single collector towards the upstream source and multicasts values to any number of consumers which then can produce the output flow of values.