Hey all,

 

I've run into a little challenge with the Shred Host programming. Namely,
that AppDomain does not provide "crash"-isolation as we had originally
thought. Boo-boo on me for not thoroughly investigating this before sinking
time into the project. That notwithstanding, I don't think this is
necessarily a major problem.

 

First, the reason that AppDomain does not provide crash-isolation, is
because primarily they are not designed to provide it, but rather, to
provide resource-access isolation. In pre-2.0 .NET, unhandled exceptions
thrown from a thread running in an AppDomain other than the default
AppDomain would just have their exceptions eaten by the CLR. Thinking a
little about this should, it's clear that this is not desirable, because you
could have worker threads that stop working, but not be detected as no
longer working until much later. In 2.0, this behaviour has changed so that
the exceptions are not eaten. Furthermore, upon further reflection,
AppDomains cannot possibly provide crash-isolation, because code running in
an AppDomain may use unmanaged code that throws unmanaged exceptions, which
cannot be intercepted by the CLR.

 

So, it seems that we may have to implement something like ASP.NET's
application pools, where groups of AppDomains are run within their own
process, and a crash in any one AppDomain will only take down those within
the same application pool, rather than any other ones that may be running at
the same time.

 

Thoughts?

 

Clinton

_______________________________________________
dev mailing list
[email protected]
http://clearcanvas.ca/mailman/listinfo/dev_clearcanvas.ca

Reply via email to