Hello! I have a code <https://pl.kotl.in/raGwOPXXg...
# coroutines
a
Hello! I have a code https://pl.kotl.in/raGwOPXXg How to do exactly the same but with Flow?
t
The only part that changes when using
Flow
in your code is the way input data is generated : https://pl.kotl.in/z0ms0AL48 There is no
parallelMap
operator that I am aware of, that allows to distribute the
map
operation to a given number of workers. For that part, you still need to use `Channel`s.
Also, notice that I added
Dispatchers.Default
as a context of
launchProcessor
, so that creating 50 workers makes much more sense than with the single-threaded context of
RunBlocking
a
Seisel thx, i rewrote it with channelFlow and use with WebFlux