Hello, I was reading about coroutines and I came ...
# coroutines
r
Hello, I was reading about coroutines and I came across this in an SO answer. "when you execute 1,000,000 concurrent routines, it doesn't have to create 1,000,000 threads" Let's say, these many routines run on just 4 threads. In that case it's same as that of a fixed thread pool of size 4 ?
a
yes and no, because coroutines are more flexible than just task executor.
z
That's a tautology, so yes 😉 By default, coroutines run on the
Default
dispatcher, which uses a thread pool of count roughly equal to the number of logical cores available (and a minimum of 2, I think, to avoid weird behavior on systems with only a single core).
r
Thanks a lot 😊