开发者

Asp.Net - When does it restart the application

开发者 https://www.devze.com 2022-12-26 06:27 出处:网络
I know that whenever you add/remove/modify any file in the \"App_Code\", \"App_GlobalResources\", and \"bin\" directories that ASP.NET will recompile and 开发者_StackOverflowessentially restart the ap

I know that whenever you add/remove/modify any file in the "App_Code", "App_GlobalResources", and "bin" directories that ASP.NET will recompile and 开发者_StackOverflowessentially restart the application.

My question is : "What happens to any threads currently executing durring the change?"

Do they finish? Is a Thread.Abort Exception thrown?

What happens if the application itself makes a change in any of those directories?


All currently executing threads are finished gracefully before recompilation.

Here's the docs:

When a worker process requests a recycle, the WWW service initiates an overlapped recycle, creating a new worker process to replace the old one. While the new worker process is starting, the old process continues to serve requests. After the new process starts and initializes successfully, the WWW service instructs the old worker process to shut down. At this point, the old worker process stops accepting new requests from HTTP.sys and begins to shut down. The WWW service allows the old worker process a configured time period in which to finish processing its requests before the worker process is shut down. The WWW service terminates the worker process if it fails to shut down within the configured time.

0

精彩评论

暂无评论...
验证码 换一张
取 消