TPL and Error Handling
As of .NET 4.0, the TPL or Task Parallel Library is king when it comes to parallelization. It allows for smooth, easy multi-threading for any application. There is a slight learning curve, however, and a major part of this is understanding how Exceptions bubble-up while using the TPL.
Let’s partake in a simple example. This code will create and run a task that throws an Exception, and then attempt to catch it: