Abort thread question

  • Thread starter Thread starter Bruce W.1
  • Start date Start date
B

Bruce W.1

I got a thread launched from my main form that makes lots of other
threads. Using Thread.Abort() I can kill the top thread but all its
sub-threads keep running.

What's the best way to kill all the sub-threads AND the top thread?

Thanks for your help.
 
* "Bruce W.1 said:
I got a thread launched from my main form that makes lots of other
threads. Using Thread.Abort() I can kill the top thread but all its
sub-threads keep running.

What's the best way to kill all the sub-threads AND the top thread?

Tell the thread (and/or maybe its subthreads) by setting a boolean
variable that they should exit.
 
Herfried K. Wagner said:
Tell the thread (and/or maybe its subthreads) by setting a boolean
variable that they should exit.

=============================================

That worked. Thanks.
 
Back
Top