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.
 

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

Back
Top