engine
Class ControlThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--engine.ControlThread
Direct Known Subclasses:
AlwaysThread, ForkThread

class ControlThread
extends java.lang.Thread

Implements a thread of control which executes concurrently


Field Summary
(package private) static int activeThreads
          counts the active threads (those witch are not always...)
static boolean doRun
          true if the simulation is in course
(package private)  Instruction ins
          the instruction list to be executed by this thread
(package private)  java.lang.Object semaphore
           
(package private)  boolean sleepy
          true if this thread is suspended
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
(package private) ControlThread(Instruction ins)
           
(package private) ControlThread(Instruction ins, java.lang.ThreadGroup tg)
           
 
Method Summary
 void forceStop()
           
static void goSleepy()
           
static void goSleepy(java.lang.Object semaphore)
           
 void run()
           
 void wakeUp()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

doRun

public static volatile boolean doRun
true if the simulation is in course

ins

Instruction ins
the instruction list to be executed by this thread

sleepy

volatile boolean sleepy
true if this thread is suspended

activeThreads

static volatile int activeThreads
counts the active threads (those witch are not always...)

semaphore

java.lang.Object semaphore
Constructor Detail

ControlThread

ControlThread(Instruction ins,
              java.lang.ThreadGroup tg)

ControlThread

ControlThread(Instruction ins)
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

goSleepy

public static void goSleepy()
                     throws SimulationStoppedException

goSleepy

public static void goSleepy(java.lang.Object semaphore)
                     throws SimulationStoppedException

wakeUp

public void wakeUp()

forceStop

public void forceStop()