Honestly, your question is not very clear. If you create an HTTP GET using the HttpClient
, say the GetAsync
method, the request starts and you can do whatever you want in your thread until you get a response. Therefore, this request is asynchronous. If you ask about the server side that processes this request (assuming it is an ASP.NET Web API), then it is asynchronous or independent of how you implemented your web API. If your action method does three things, say 1, 2, and 3, one after the other, synchronously in blocking mode, the same thread sends a request to the service. On the other hand, let's say that # 2 above is a web service call, and this is an HTTP call. Now, if you use HttpClient and you make an asynchronous call, you may find yourself in a situation where one request is served by more than one thread. For this to happen, you had to make an HTTP call from your action method asynchronously and use the async
. In this case, when you call await
inside the action method, the action of your action is executed, and the thread serving your request can serve some other request, and ultimately, when the response is available, the same or some other thread will continue from where he was stopped earlier. A long boring answer, perhaps, but difficult to explain simply with words, typing, I think. Hope you get some clarity.
UPDATE: Your action method will execute in parallel in 10,000 threads (ideally). Why do I say ideally because the CLR thread pool with 10,000 threads is not typical and probably impractical. There are physical limitations, as well as restrictions imposed by the structure, but I think the answer to your question is that the requests will be served in parallel. The correct term here will be "parallel," but not "asynchronous."
Badri source share