Can I kill a .NET 4.0 Task object with some method like we could with the old and dangerous Thread.Abort() as discussed in the SO thread (pun intended and save the kittens!)
Kenny
The Task
class is designed, and intended, to use the new Cooperative Cancellation model of .NET 4 instead of relying on a destructive "abort" style of cancellation.
There is no direct way to cancel a Task
(like Thread.Abort()
, though that's very bad to use in any case), but there is an entire framework in place to provide the tooling to request that the Task cancel itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With