Unified
Split
Showing
with
12 additions
and 0 deletions.
- BIN .DS_Store
- BIN src/.DS_Store
- +12 −0 src/main/java/org/jboss/threads/EnhancedQueueExecutor.java
Binary file not shown.
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 | ||
| // ======================================================= | ||