class ParThread
extends java.lang.Thread
Parallel
to run all but
one of its given processes.
Parallel
to run
all but one of its given processes.
The CSProcess to be executed can be changed using the setProcess method providing the ParThread is not active.
CSProcess
,
ProcessManager
,
Parallel
Modifier and Type | Field and Description |
---|---|
private Barrier |
barrier
the barrier at the end of a PAR
|
private Barrier |
park
parking barrier for this thread
|
private CSProcess |
process
the process to be executed
|
private boolean |
running |
Constructor and Description |
---|
ParThread(CSProcess process,
Barrier barrier)
Construct a new ParThread.
|
Modifier and Type | Method and Description |
---|---|
void |
release()
Releases the ParThread to do some more work.
|
void |
reset(CSProcess process,
Barrier barrier)
reset the ParThread.
|
void |
run()
The main body of this process.
|
void |
terminate()
Sets the ParThread to terminate next time it's unparked.
|
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
private CSProcess process
private Barrier barrier
private boolean running
private Barrier park
public void reset(CSProcess process, Barrier barrier)
process
- the process to be executedbarrier
- the barrier for then end of the PARpublic void terminate()
public void release()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread