Asynchronous thread mechanics

In .NET, when you make an asynchronous call, I understand that this call is allowed in a separate thread, thereby not blocking the original thread where the call was made.

How mechanics work behind this. Is a new thread spawned for each asynchronous call, or is there a common async thread that handles these operations? If this is a shared thread, make several asynchronous calls blocking each other at run time. And if separate threads arise, will the application not experience serious performance problems due to too many threads running at the same time if many asynchronous calls are made during the same time interval.

+3
source share
2 answers

I believe this MSDN article should answer all your questions. Note that most of your intuition is actually correct. All you have to do is study the details.

Thread Pool Programming in the .NET Framework

+2
source

I would suggest that the .NET Framework uses its ThreadPool for anything async unless you specifically create and start a new thread yourself.

0
source

Source: https://habr.com/ru/post/1750863/


All Articles