I have the following problem, where I have a for()
that opens 17 threads and need to retrieve, in another thread (18th) the active threads I opened earlier and check which ones are still active.
I took a look around the internet, but I did not find any plausible solution to my problem.
What would be the best solution to recover the active threads I opened earlier?
Follow the Code:
for(int i = 1; i <= 500; i+=30){
Runnable r = new Async(empresa,i,30);
Thread t = new Thread(r);
t.start();
}