Join Slack
Powered by
does kotlin flow currently support creating batche...
# coroutines
p
Peter Ertl
01/13/2021, 10:40 PM
does kotlin flow currently support creating batches of items, e.g. for executing batched sql inserts? like that (pseudo code): flow.batch(size=20).collect { batchOfUpTo20ItemsFromFlow -> /* do something */ }
g
gildor
01/14/2021, 1:38 AM
Nopt, there is no Flow version of chunked/windowed operator in Flow, there is a discussion about it:
https://github.com/Kotlin/kotlinx.coroutines/issues/1290
gildor
01/14/2021, 1:41 AM
also there is a PR, but it will not be merged, there are plans for more (with support of time-based batches):
https://github.com/Kotlin/kotlinx.coroutines/pull/1558
221
Views
Open in Slack
Previous
Next