Question
How to catch exceptions from a ThreadPool.QueueUserWorkItem?
I have the following code that throws an exception:
ThreadPool.QueueUserWorkItem(state => action());
When the action throws an exception, my program crashes. What is the best practice for handling this situation?
45 21597
45