edu.princeton.toy.lang
Class TVirtualMachine.Runner

java.lang.Object
  extended by 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.


Field Summary
protected  boolean interrupted
           
protected  boolean isRunning
           
 
Constructor Summary
protected TVirtualMachine.Runner()
           
 
Method Summary
 void run()
          Implement Runnable to run the TVirtualMachine.
 void start(TVirtualMachine.ExecutionController controller)
          Causes the runner to start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isRunning

protected boolean isRunning

interrupted

protected boolean interrupted
Constructor Detail

TVirtualMachine.Runner

protected TVirtualMachine.Runner()
Method Detail

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