O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Threading Exceptions

Exceptions need to be dealt with appropriately in order to avoid threads terminating prematurely. Any exception within a thread that is not handled will cause the thread to be terminated. Therefore, it is a good programming practice to at least report all exceptions and handle those exceptions that are expected.

System.Threading.ThreadAbortException

Calling the Thread.Abort() method will raise the ThreadAbortException on the target thread. Normally, this will cause the thread to terminate. However, a thread can catch the ThreadAbortException and choose to ignore it by using the Thread.ResetAbort() method.

There are two overloaded Abort() methods. One method does not take any parameters; the other takes a System.Object that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required