Threadpool in IIS context

后端 未结 1 1190
日久生厌
日久生厌 2020-12-09 06:12

I have a general question about System.Threading.Threadpool when run in a webapplication on IIS. Say we have 2 requests execute at once, and we fire up a couple of threads

相关标签:
1条回答
  • 2020-12-09 06:43

    Here is a quote from the MSDN documentation about the ThreadPool class:

    There is one thread pool per process. The thread pool has a default size of 250 worker threads per available processor, and 1000 I/O completion threads.

    In IIS6 and IIS7 any given ASP.NET application is hosted inside of a single process (w3wp.exe) through the Application Pool infrastructure.
    An Application Pool can host multiple web applications by keeping them in different AppDomains, but it runs inside of one physical process on the server.

    These two facts mean in practice that all threads from a running web application instance execute inside the same .NET Thread Pool.

    0 讨论(0)
提交回复
热议问题