'Is it possible to display information about each active thread in a threadpool in Java?
I'm currecntly working on a method that prints thread pool metrics. I count overall progress using thread pool methods.
int progress = Math.round((executor.getCompletedTaskCount() * 100) /
executor.getTaskCount());
The output looks like this: Total progress: 26%; time remained: 3 s; number of threads: 8
Is it possible to print information about each active thread in a pool? For example, "thread - 1: 20%, thread - 2: 10%"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
