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.ThreadThis is the Thread class used byParallelto run all but one of its given processes.Description
A ParThread is a Thread used byParallelto 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 voidrelease()Releases the ParThread to do some more work.voidreset(CSProcess process, Barrier barrier)reset the ParThread.voidrun()The main body of this process.voidterminate()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:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
-