what happens if Thread.Abort() is called during a catch() block ?

  • Thread starter Thread starter andrew
  • Start date Start date
A

andrew

what happens with the code from the catch block ?
is it interrupted by the ThreadAbortException ?

void ThreadProc( )
{
try
{

}
catch(Exception ex)
{
// thread.Abort() from another thread on this thread is called
at this moment
}
}
 
andrew said:
what happens with the code from the catch block ?
is it interrupted by the ThreadAbortException ?

void ThreadProc( )
{
try
{

}
catch(Exception ex)
{
// thread.Abort() from another thread on this thread is called
at this moment
}
}

Yes. A ThreadAbortException is thrown, and the code is interrupted.
 
Back
Top