Java multi-threading - what is the best way to monitor the activity of a number of threads?
- by MalcomTucker
I have a number of threads that are performing a long runing task. These threads themselves have child threads that do further subdivisions of work. What is the best way for me to track the following:
How many total threads my process has created
What the state of each thread currently is
What part of my process each thread has currently got to
I want to do it in as efficient a way as possible and once threads finish, I don't want any references to them hanging around becasuse I need to be freeing up memory as early as possible.
Any advice?