|
-
Sep 21st, 2011, 05:29 AM
#4
Re: how to stop threads ?
You've only got one variable so you only have one Thread reference so you can only Abort one thread. If you want to abort every thread then you need a reference to every Thread object. That means either an individual variable for each one or an array or collection containing them all.
That said, you really shouldn't be starting that many threads explicitly. With that many tasks to run you should be using the ThreadPool, either directly or indirectly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|