TaskCancelledException vs OperationCancelledException

added by bsenoff
6/1/2012 9:45:34 AM

2 Kicks, 230 Views

I had a conversation with Stephen Toub, Peter Ritchie and Kevin Hazzard about the different between the TaskCancelledException and the OperationCancelledException. It turns out not to be a big difference, but some understanding might keep you out of a bit of trouble.


6/1/2012 9:47:28 AM
It is interesting that we even have exceptions thrown by cancellation, but in this case it seems like the hairiness there is circumvented by CancellationToken and CancellationTokenSource. I'm assuming some of the threading issues you're referring to could result in general application exceptions due to the thread terminating?