Skip to content
Permalink
Browse files

Merge pull request #47 from dmlloyd/jbthr-73

[JBTHR-73] Allow thread enumeration
  • Loading branch information
dmlloyd committed Apr 24, 2019
2 parents fa2feac + ea34b74 commit 676c69f0eb877e93d3aa25bef9e8aebb9d77bd4a
BIN +6 KB .DS_Store
Binary file not shown.
BIN +6 KB src/.DS_Store
Binary file not shown.
@@ -66,6 +66,8 @@
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
public final class EnhancedQueueExecutor extends EnhancedQueueExecutorBase6 implements ManageableThreadPoolExecutorService {
private static final Thread[] NO_THREADS = new Thread[0];

static {
Version.getVersionString();
}
@@ -1357,6 +1359,16 @@ public int getPoolSize() {
return currentSizeOf(threadStatus);
}

/**
* Get an array containing an approximate snapshot of the currently running threads in
* this executor.
*
* @return an array of running (unterminated) threads (not {@code null})
*/
public Thread[] getRunningThreads() {
return runningThreads.toArray(NO_THREADS);
}

// =======================================================
// Pooled thread body
// =======================================================

0 comments on commit 676c69f

Please sign in to comment.
You can’t perform that action at this time.