public class ClosureThread
extends java.lang.Thread
Thread
.Constructor and Description |
---|
ClosureThread(Closure closure)
Constructs a ClosureThread object.
|
Modifier and Type | Method and Description |
---|---|
void |
run() |
void |
setRunClosure(Closure closure)
Sets the ClosureThread's run method.
|
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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ClosureThread(Closure closure)
closure
- a Closure object, of arity one. The argument as usual
is the this
object. The thread whose run method this closure
belongs too.public void setRunClosure(Closure closure)
closure
- a Closure object, of arity one. The argument as usual
is the this
object. The thread whose run method this closure
belongs too.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread