Class Simulator.SimulatorWorkerThread

java.lang.Object
java.lang.Thread
nl.tudelft.simulation.dsol.simulators.Simulator.SimulatorWorkerThread
All Implemented Interfaces:
Runnable
Enclosing class:
Simulator<T extends Number & Comparable<T>>

protected static class Simulator.SimulatorWorkerThread extends Thread
The worker thread to execute the run() method of the Simulator and to start/stop the simulation.
  • Constructor Details

    • SimulatorWorkerThread

      protected SimulatorWorkerThread(String name, Simulator<?> job)
      constructs a new SimulatorRunThread.
      Parameters:
      name - String; the name of the thread
      job - Runnable; the job to run
  • Method Details

    • cleanUp

      public void cleanUp()
      Clean up the worker thread. synchronized method, otherwise it does not own the Monitor on the wait.
    • isRunning

      public boolean isRunning()
      Returns:
      whether the run method of the job is running or not
    • isWaiting

      public boolean isWaiting()
      Returns:
      whether the thread is in the waiting state
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread