I'm new to coroutines and need some help please. O...
# coroutines
z
I'm new to coroutines and need some help please. On coroutineContext I'm running one while loop (start function, with blocking api call) and also actor which serves to send packets (api call also). Are those api calls wait for each other or can they run in parallel? Sample code: https://goo.gl/a87Vs9
g
They can run in parallel. Looks fine for me. You can check it yourself if add some logic and logging
but launch isActive is not necessary if you have suspend function call (but may be useful in some more complicated cases)
also you don’t need
coroutineContext
in actor builder
same for launch
z
thank you very much 👏🏻🍺
it's so much simpler and easier to understand than write that in java with executors and arrayblockingqueues 😅