Do asynchronous operations in ASP.NET MVC use a thread from ThreadPool on .NET 4

前端 未结 6 1283
天命终不由人
天命终不由人 2020-11-28 17:21

After this question, it makes me comfortable when using async operations in ASP.NET MVC. So, I wrote two blog posts on that:

  • My Take on
6条回答
  •  借酒劲吻你
    2020-11-28 17:51

    First thing its not MVC but the IIS who maintains the thread pool. So any request which comes to MVC or ASP.NET application is served from threads which are maintained in thread pool. Only with making the app Asynch he invokes this action in a different thread and releases the thread immediately so that other requests can be taken.

    I have explained the same with a detail video (http://www.youtube.com/watch?v=wvg13n5V0V0/ "MVC Asynch controllers and thread starvation" ) which shows how thread starvation happens in MVC and how its minimized by using MVC Asynch controllers.I also have measured the request queues using perfmon so that you can see how request queues are decreased for MVC asynch and how its worst for Synch operations.

提交回复
热议问题