Hi Amendra,
I think that, when Abort is invoked from outside, the thread waits for a
suitable moment to Abort...
From the .net help file:
"The thread is not guaranteed to abort immediately, or at all. This
situation can occur if a thread does an unbounded amount of computation in
the finally blocks that are called as part of the abort procedure, thereby
indefinitely delaying the abort. To ensure a thread has aborted, invoke a
Join method on the thread after calling Abort."
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
"Amendra" <am*****@virtusa.com> wrote in message
news:uT*************@TK2MSFTNGP10.phx.gbl...
hi,
I have a Parent child design of a multi threaded application in C#. My
issue is I want the parent class to be able abort or stop the child threads. I
tried abort from the parent, then the child goes to ThreadAbort Requested
state, and not abort state. But when I call the abort method from the
child Thread itself, it throws ThreadAbortException and aborts. Why is it, that
this does not work the same way when being aborted by the Childs parent.
I need the thread to abort in the way it aborts when being called abort by
the thread itself.
Any solution.
Thanks
Amendra