Startup, Shutdown and related matters
Also see: Single source code base for Silverlight and WPF solutions
Usually
I write blog articles on topics that people request via email or comments on
other blogs. Well, nobody has ever
asked me to write anything about shutdown.
But then
I look at all the problems that occur during process shutdown in the unmanaged
world. These problems occur because
many people don’t understand the rules, or they don’t follow the rules, or the
rules couldn’t possibly work anyway.
We’ve
taken a somewhat different approach for managed applications. But I don’t think we’ve ever explained
in detail what that approach is, or how we expect well-written applications to
survive an orderly shutdown.
Furthermore, managed applications still execute within an unmanaged OS
process, so they are still subject to the OS rules. And in V1 and V1.1 of the CLR we’ve
horribly violated some of those OS rules related to startup and shutdown. We’re trying to improve our behavior
here, and I’ll discuss that too.
