The finally
blocks are always fully protected from ThreadAbortException
both if they are executing and if they would need to be executed during the rollback of the stack.
And yes, clearly the ThreadAbortException
will be automatically re-raised at the end of any try... catch
block in the same thread that intercepts it, otherwise it would be meaningless. What use would it have to have a ThreadAbortException
with only two "lives"?
Would it be logical that this could stop a ThreadAbortException
?
try
{
try
{
// The Thread.Abort "happens" here
Thread.Sleep(Timeout.Infinite);
}
catch
{
}
}
catch
{
}
while this wouldn't?
try
{
// The Thread.Abort "happens" here
Thread.Sleep(Timeout.Infinite);
}
catch
{
}