How does one count the number of threads in a program? I want to modify the method below so that when a new socket connects (and a new thread is opened) the count increases by 1 and when the thread ends it decreases by 1. Alternatively, I would like to store all the active threads in an array. Is there a standard way of doing this?
posted 8 years ago
Sounds a more complicated question than we usually get here on beginners'. Moving.