Threadpool vs. Tasks

added by dpeterson
8/24/2011 10:42:06 PM

241 Views

Paul Stovell shows us how some of the new-fangled Tasks features can be implemented in a simple .Net 2.0 threadpool


2 comments

vijayst
8/25/2011 7:49:16 AM
This is a well written article on ThreadPool. It is interesting to know that an uncaught exception in a worker thread can crash the entire AppDomain.

dpeterson
8/25/2011 3:53:17 PM
I think that functionality makes sense, I don't think it would be possible for the CLR to determine what should happen when a thread crashes, so the safe solution is to crash everything so that nothing unexpected happens.
If an exception is uncaught, you'd have no idea that a thread crashed, crashing the domain seems like the only option at that point.