Class EngineThread

  • All Implemented Interfaces:
    Runnable

    public final class EngineThread
    extends Thread
    • Constructor Detail

      • EngineThread

        public EngineThread​(@NotNull
                            @NotNull Engine e)
        Default constructor
        Parameters:
        e - Target engine
    • Method Detail

      • start

        public void start()
        Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.

        The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).

        It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.

        Overrides:
        start in class Thread
        Throws:
        IllegalThreadStateException - if the thread was already started.
        See Also:
        run()
      • run

        public void run()
        If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.

        Subclasses of Thread should override this method.

        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
        See Also:
        start()
      • closeAndKill

        public void closeAndKill()
        Kill current thread