3 ms·
Thread context switches are pretty expensive. Opinions are pretty divided on this one these days. There was a time when this was very much true but there is so
by zaphar 4y ago
Thread context switches are pretty expensive.
Opinions are pretty divided on this one these days. There was a time when this was very much true but there is some evidence that it is no longer, practically speaking, an issue except in extreme cases. You do pay a cost but it's not immediately obvious that the cost is material. I reach for a threadpool first and async when it becomes clear that I need the extra performance. 99% of the time the threadpool is more than good enough.