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

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
}
}
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top