posted 20 years ago
It's just a matter of program design. I have a little program that spins off a number of threads to do some work. I read the starting point for each thread from a file and rewrite the file to record how much got done. I stop all those worker threads before the main thread rewrites the file and exits the program.
There are programs that can let the main thread end while other threads go on. Have you done any Swing programming? You might write a little main() routine that opens a frame. Opening the frame gets the Swing thread going, and the Swing thread goes until you shut down the program, even though the main ended almost immediately.
Do those examples help?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi