I know, but still - if I have 3 net connections downloading stuff and stuffing it into one data structure, I can't do much around it... I am still stuck with synchronization BS, or copy problems etc. Ok not your problem anyway 🙂
g
gildor
01/26/2018, 8:24 AM
You can relatively easy write thread safe code with coroutines. For example using actors or another approach that removes shared mutable state
o
Olekss
01/26/2018, 8:25 AM
Exactly... only with actors and channels -> Thats fairly new to me, so need to unlearn old JAVA thinking.
ok thanks
g
gildor
01/26/2018, 8:26 AM
I don’t know how your “data structure” for result works, so cannot recommend particular solution, but maybe you can do that even without actors, just use coroutines to handle results in a particular thread so no more concurrency problem