Package org.jcsp.lang
Class ParThread
- java.lang.Object
-
- java.lang.Thread
-
- org.jcsp.lang.ParThread
-
- All Implemented Interfaces:
java.lang.Runnable
class ParThread extends java.lang.Thread
This is the Thread class used byParallel
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:
CSProcess
,ProcessManager
,Parallel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.lang.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
-
-
-
-
Method Detail
-
reset
public void reset(CSProcess process, Barrier barrier)
reset the ParThread.- Parameters:
process
- the process to be executedbarrier
- the barrier for then end of the PAR
-
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
public void run()
The main body of this process. above.- Specified by:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
-