views:

51

answers:

2

In .NET when you make an async call I understand that this call is resolved in a seperate thread thus not blocking the original thread where the call was made.

How does the mechanics behind this work. Is a new thread spawned on every async call or is there a shared async thread that handles these operations? If it is a shared thread, do several async calls block eachother while execution. And if individual threads is spawned, won't the application experience serious performance issues due to having too many threads running concurrently if many async calls is made within the same time frame.

+2  A: 

I believe this MSDN article should answer all your questions. Take note that most of your intuition is in fact correct. All you need to do is research the details.

Programming the Thread Pool in the .NET Framework

ChaosPandion
To be more specific, asynchronous I/O is queued to an I/O completion port which is part of the .NET thread pool. The completion routine is handled by a thread pool thread. Asynchronous computations just run on a thread pool thread. IIRC. :)
Stephen Cleary
@Stephan - You do recall correctly. I felt like this article fit the bill in general as the `ThreadPool` is where all the magic happens.
ChaosPandion
A: 

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

Chad