M
mehdi
Hi folks,
You know, the Thread class has got a method named Abort which
according to the msdn:
"Raises a ThreadAbortException in the thread on which it is invoked,
to begin the process of terminating the thread. Calling this method
usually terminates the thread."
I've had a long discussion with someone on not to use the mentioned
method unless under the most extreme cases. I believe that it's
equivalent to the TerminateThread Win32 API and everything that
applies to the mentioned Win32 API, is also in place when using the
Thread.Abort method. When the Abort method is executed, the target
thread has no chance to execute any user-mode code and its initial
stack is not deallocated. On the other hand, DLLs attached to the
thread are not notified that the thread is terminating. And therefore
the use of the mentioned method is completely at your own risk.
Correct me if I'm wrong.
Thank in advance.
Mehdi
You know, the Thread class has got a method named Abort which
according to the msdn:
"Raises a ThreadAbortException in the thread on which it is invoked,
to begin the process of terminating the thread. Calling this method
usually terminates the thread."
I've had a long discussion with someone on not to use the mentioned
method unless under the most extreme cases. I believe that it's
equivalent to the TerminateThread Win32 API and everything that
applies to the mentioned Win32 API, is also in place when using the
Thread.Abort method. When the Abort method is executed, the target
thread has no chance to execute any user-mode code and its initial
stack is not deallocated. On the other hand, DLLs attached to the
thread are not notified that the thread is terminating. And therefore
the use of the mentioned method is completely at your own risk.
Correct me if I'm wrong.
Thank in advance.
Mehdi