public class ERXTaskThread extends 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
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ERXTaskThread(Runnable target) |
Modifier and Type | Method and Description |
---|---|
String |
elapsedTime() |
void |
setTask(Runnable task) |
void |
startStopWatch() |
void |
stopStopWatch() |
Runnable |
task() |
static <T> NSArray<T> |
taskForTaskClass(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, yield
public ERXTaskThread(Runnable target)
public Runnable task()
public void setTask(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()
ERXTaskInfo
public void startStopWatch()
public String elapsedTime()
public void stopStopWatch()
Copyright © 2002 – 2024 Project Wonder.