Just wondering...
I'm going to start a new thread each time there is a new connection on the port I'm listening no. The program runs in an eternal loop. So I can't just put the threads in a for loop and then know how many threads that have been running. But when the program ends I have to wait for all the running threads to finish, but how do I do that when I don't know how many threads that have been running.
Of course I can have a counter that counts up the threads, but eventually this counter has to have a limit. And what do I do then, when the counter reaches the limit?