musikr: re-add removed flow buffer

This commit is contained in:
Alexander Capehart
2025-07-05 14:20:50 -06:00
parent 9886ec913c
commit 287b4f72b4
@@ -55,10 +55,11 @@ internal fun <T, R> Flow<T>.distributedMap(
for (channel in posChannels) { for (channel in posChannels) {
channel.close() channel.close()
} }
}.buffer() }
.buffer()
return (posChannels.map { it.receiveAsFlow() } + managerFlow) return (posChannels.map { it.receiveAsFlow() } + managerFlow)
.asFlow() .asFlow()
.map { it.tryMap(block).flowOn(on) } .map { it.tryMap(block).flowOn(on).buffer(buffer) }
.flattenMerge(concurrency = n + 1) .flattenMerge(concurrency = n + 1)
} }