简体   繁体   English

线程,应用程序域和工作进程之间的关系

[英]Relationship between threads, app domains and worker processes

In IIS7 and ASP.NET, what is the exact relationship among: 在IIS7和ASP.NET中,它们之间的确切关系是什么:

  • IIS Worker Processes IIS工作进程
  • Threads 主题
  • AppDomains 应用程序域
  • Applications, and 应用程序和
  • incoming requests. 来电请求。

I'm hoping for an answer in a format similar to : 我希望得到一个类似于以下格式的答案:

"Each IIS worker process hosts many appdomains which each spawn a single thread in response to each request...." etc. , and any nuances mentioned. “每个IIS工作进程都会托管许多应用程序域,每个应用程序域都会生成一个线程以响应每个请求......”等等,以及提到的任何细微差别。

Each worker process hosts several AppDomains (at least one per ASP.NET app, ie a Website or Virtual Directory). 每个工作进程都承载多个AppDomain(每个ASP.NET应用程序至少有一个,即网站或虚拟目录)。 An incoming request is assigned a thread from thread pool when it comes. 传入的请求在线程池到来时被分配了一个线程。

OP: Q. So each appdomain owns and manages its own thread pool? OP: :那么每个appdomain都拥有并管理自己的线程池?

Each managed Thread is always assigned to a single AppDomain at a time. 每个托管线程始终一次分配给单个AppDomain。 The worker process maintains a shared thread pool and it's assigned to a specific AppDomain for the duration of a request. 工作进程维护共享线程池,并在请求期间将其分配给特定的AppDomain。

Fritz Onion的书Essential ASP.NET有一章关于HTTP Pipeline ,他在http请求中讨论了上述所有关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM