Interrupting a thread from within the same thread

I created thread A and decided to interrupt it from inside thread A. Is this possible? If so, how can I do this?

Thanks for the help!

+4
source share
1 answer

Of course you can do:

Thread.CurrentThread.Abort();

Perhaps interrupting the current thread is the only kind of undo that is safe, as it is the only thread you really know about in terms of what it does. For example, this HttpResponse.End.

, - , , Thread.ResetAbort, ThreadAbortException catch - "uber-exception" .

+12

All Articles