As we know in .net 4.5 UnobservedTaskException does not crash an app.
To make it easier for developers to write asynchronous code based on tasks, the .NET Framework 4.5 changes the default exception behavior for unobserved exceptions. Although unobserved exceptions still raise the UnobservedTaskException exception, the process does not terminate by default. Instead, the exception is handled by the runtime after the event is raised, regardless of whether an event handler observes the exception. This behavior can be configured. Starting with the .NET Framework 4.5, you can use the configuration element to revert to the behavior of the .NET Framework 4 and terminate the process:
Ok, assume Microsoft decided to change the experience of multi-thread working with exceptions but why it applied only for tpl then? Why the other parts of multi-thread mechanisms was not changed? Eg, the following code still crash the app
static void Main(string[] args)
{
ThreadPool.QueueUserWorkItem(state => { throw new Exception(); });
Console.ReadLine();
}
It's confusing and looks very strange. Anybody know anything about this?