.NET Parallel Programming

All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…

FAQ :: TaskScheduler.UnobservedTaskException event doesn’t work?

Recall that if exceptions thrown from Task bodies are left unobserved, they will be escalated.  In .NET 4, this means that TPL will throw them on the finalizer after the Task objects are available for garbage collection.  The UnobservedTaskException event on the TaskScheduler class was added as a last-resort method to observe such ...