public class ERXTaskThread
extends java.lang.Thread
Thread subclass that is used for running background tasks.
This Thread subclass is automatically created by the ERXTaskThreadFactory
which in turn is used by the ERXTaskThreadPoolExecutor
The purpose of this subclass is
ERXTaskThreadFactory
using instanceof when enumerating all threads
ERXTaskThreadFactory
A user does not generally need to instantiate this class. This class is generally used by ExecutorService instances
that are created by ERXExecutorService static utility methods.
ERXTaskThreadPoolExecutor,
ERXExecutorService,
ERXTaskThreadFactory| Constructor and Description |
|---|
ERXTaskThread(java.lang.Runnable target) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
elapsedTime() |
void |
setTask(java.lang.Runnable task) |
void |
startStopWatch() |
void |
stopStopWatch() |
java.lang.Runnable |
task() |
static <T> NSArray<T> |
taskForTaskClass(java.lang.Class<T> clazz) |
static NSArray |
taskInfos() |
static NSArray |
tasks() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic java.lang.Runnable task()
public void setTask(java.lang.Runnable task)
task - the current task being executed
TODO: Check if the Runnable is a Future wrapping the real task and unwrap it.public static NSArray tasks()
public static NSArray taskInfos()
ERXTaskInfopublic static <T> NSArray<T> taskForTaskClass(java.lang.Class<T> clazz)
public void startStopWatch()
public java.lang.String elapsedTime()
public void stopStopWatch()
Copyright © 2002 – 2022 Project Wonder.