Class WorkerThread

    • Constructor Detail

      • WorkerThread

        public WorkerThread​(String name,
                            Runnable job)
        constructs a new SimulatorRunThread.
        Parameters:
        name - String; the name of the thread
        job - Runnable; the job to run
    • Method Detail

      • 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
      • run

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