0

I wrote a program that has to process any files that are put in a specified folder.

I would like to keep track of those threads, though, preferably via some sort of process id or something. is there any way that I can get a list of the threads that are currently alive?

I dont assign the threads names, because there can be anything from 0 to 20 threads at a time.

Help would be very much appreciated.

I can also supply the code that I wrote, if needed.

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by P00dle
1

Take a look at the documentation for the following methods:

Thread.activeCount();
Thread.enumerate(Thread[] list);
Thread.getId();

Hope this helps.

Edited by sergb: n/a

0

Take a look at the documentation for the following methods:

Thread.activeCount();
Thread.enumerate(Thread[] list);
Thread.getId();

Hope this helps.

It did, thank you :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.