4 ms·
There is sort of an event loop: the .NET Threadpool. It is used by async by default. It will by default quickly create an number of threads equal to the number
by MarkSweep 6y ago
There is sort of an event loop: the .NET Threadpool. It is used by async by default. It will by default quickly create an number of threads equal to the number of CPU cores, but then slowly increase it beyond that. If you are blocking in a threadpool thread, the work item queue will back up. This is called threadpool starvation.
Some articles:
https://docs.microsoft.com/en-us/archive/blogs/vancem/diagnosing-net-core-threadpool-starvation-with-perfview-why-my-service-is-not-saturating-all-cores-or-seems-to-stall https://docs.microsoft.com/en-us/archive/blogs/vancem/diagno...
https://github.com/Microsoft/vs-threading/blob/master/doc/threadpool_starvation.md https://github.com/Microsoft/vs-threading/blob/master/doc/th...