Re: ThreadAbortException fails to get thrown from thread making remoting call.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Howard Swope" <hswopeATtrafficDOTcom> wrote in message
news:u9HFDCkZHHA.3520@xxxxxxxxxxxxxxxxxxxxxxx
I have a thread that is making a remoting call. Another thread calls to
abort this thread, which is supposed to fire a ThreadAbortException on the
thread that is making the remoting call. This does not happen.

Any thoughts?
....

Threads can be aborted only in certain states and at certain moments. If
thread is blocked in API call for example, it cannot be aborted by .NET
framework. You may resort to aborting through native windows API, however
this may lead to nasty consequences (if possible at all). I thnik that there
should be some resources on the internet about .NET aborting calls.

I also noticed that remoting threads cannot be aborted. Since it rarly
happens, I leave them hanging. However, you must ensure that you don't hold
any locks in the process...

Regards,
Goran


.