Posted By:
Alex_Chaffee
Posted On:
Tuesday, April 24, 2001 06:57 AM
There's no short cut here. When you want to stop the threads, you stop the threads. Are you looking for a button press? A file value changed? A certain amount of time to elapse?
If you're looking for a calculation to end, then that calculation must set a value in a shared variable.
You can also have the threads die when they finish processing. Another thread can wait for this with join().
That's the thing about infinite loops -- they never stop :-)