I want a thread in a Java program to loop until all other threads die, and then end the loop. How can I know when my loop thread is the only thread remaining?
In my situation, the loop thread will have no reference to any other threads, so I don't think isAlive()
helps me.