Join Slack
Powered by
it is possible with simple pipeline? Without addin...
# coroutines
a
Alexjok
07/14/2019, 8:27 PM
it is possible with simple pipeline? Without adding channels and etc
o
octylFractal
07/14/2019, 8:33 PM
https://github.com/Kotlin/kotlinx.coroutines/issues/1147
specifically for the parallel part. chunking is
https://github.com/Kotlin/kotlinx.coroutines/issues/1290
a
Alexjok
07/14/2019, 8:48 PM
Thx
g
gildor
07/14/2019, 11:22 PM
It's also possible without Flow and Channels
gildor
07/14/2019, 11:24 PM
Just chunked, and process each chunk sequentially, do flatMap and inside run 1 coroutine on each item and awaitAll for them
gildor
07/15/2019, 4:16 AM
I mean something like this (just change WORKERS_COUNT and check execution time):
https://pl.kotl.in/qjzAuOUmO
👍 1
gildor
07/15/2019, 4:22 AM
Or it can be extracted to some more generic function:
https://pl.kotl.in/_tA6hVRRa
👍 2
a
Alexjok
07/15/2019, 7:54 AM
@gildor
yes, this is what I need! Thx
8
Views
Open in Slack
Previous
Next