Simple question guys, Given I have a full not blo...
# coroutines
j
Simple question guys, Given I have a full not blocking data pipeline, is there any case than my application would benefitc from use a coroutines dispacher with greather threads number that server number of processor (as
DefaultDispatcher
) as far as I understant, my threads will be busy all the time as
suspend
operations will not block them so there is not benefits (in terms of pipeline throughput) from more threads, and actually throughput is expected to decrease bacause of new threads context switching.
b
Suspending is mainly useful for asynchronous Operations that would be wasteful on a thread (particularly IO where a thread is sitting there waiting)
You have to balance parallel throughput with increased memory requirements
u
@Juan Rada your logic seems sound to me. I still suggest to try it out.