Timeout Pattern – How bad is Thread.Abort really?

Basically you’re talking about aborting an action which (as far as we know) has no graceful way of aborting.

That means there’s going to be no safe way of aborting it. Thread.Abort is just not a nice thing to do – there are various race conditions and ugly situations you can get into (see the link in Richard’s answer). I would try desperately hard to avoid wanting to cancel actions that don’t know about cancellation – and if you absolutely have to do it, consider restarting the whole app afterwards, as you may no longer be in a sane state.

Leave a Comment