edu.princeton.toy.lang
Class TVirtualMachine.Runner
java.lang.Object
edu.princeton.toy.lang.TVirtualMachine.Runner
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- TVirtualMachine
protected class TVirtualMachine.Runner
- extends Object
- implements Runnable
Runner is a simple implementation of Runnable for the Thread stated by the run() method
of the TVM.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isRunning
protected boolean isRunning
interrupted
protected boolean interrupted
TVirtualMachine.Runner
protected TVirtualMachine.Runner()
start
public void start(TVirtualMachine.ExecutionController controller)
- Causes the runner to start. This should only be called by a Thread which has
synchronized the TVirtualMachine and has checked that the Runner is not already running.
- Parameters:
controller
- The implementation of ExecutionController which will recieve
notification of the completion of a batch of steps and control the size of each batch.
run
public void run()
- Implement Runnable to run the TVirtualMachine.
- Specified by:
run
in interface Runnable