Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
DispatchThread(Handler cameraHandler,
HandlerThread cameraHandlerThread) |
Modifier and Type | Method and Description |
---|---|
void |
end()
Gracefully ends this thread.
|
void |
run()
If this thread was constructed using a separate
Runnable run object, then that
Runnable object's run method is called;
otherwise, this method does nothing and returns. |
void |
runJob(Runnable job)
Queues up the job.
|
void |
runJobSync(Runnable job,
Object waitLock,
long timeoutMs,
String jobMsg)
Queues up the job and wait for it to be done.
|
activeCount, blockedOn, 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, parkFor$, parkUntil$, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, unpark$, yield
public DispatchThread(Handler cameraHandler, HandlerThread cameraHandlerThread)
public void runJob(Runnable job)
job
- The job to run.public void runJobSync(Runnable job, Object waitLock, long timeoutMs, String jobMsg)
job
- The job to run.timeoutMs
- Timeout limit in milliseconds.jobMsg
- The message to log when the job runs timeout.public void end()
public void run()
Thread
Runnable
run object, then that
Runnable
object's run
method is called;
otherwise, this method does nothing and returns.
Subclasses of Thread
should override this method.
run
in interface Runnable
run
in class Thread
Thread.start()
,
Thread.stop()
,
Thread.Thread(ThreadGroup, Runnable, String)