Class ParThread
java.lang.Object
java.lang.Thread
org.jcsp.lang.ParThread
- All Implemented Interfaces:
Runnable
This is the Thread class used by
Parallel to run all but
one of its given processes.
Description
A ParThread is a Thread used byParallel 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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Barrierthe barrier at the end of a PARprivate Barrierparking barrier for this threadprivate CSProcessthe process to be executedprivate booleanFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Thread
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
-
Field Details
-
process
the process to be executed -
barrier
the barrier at the end of a PAR -
running
private boolean running -
park
parking barrier for this thread
-
-
Constructor Details
-
ParThread
-
-
Method Details
-
reset
-
terminate
public void terminate()Sets the ParThread to terminate next time it's unparked. -
release
public void release()Releases the ParThread to do some more work. -
run
-