Class MainThread

java.lang.Object
java.lang.Thread
studio.magemonkey.fabled.thread.MainThread
All Implemented Interfaces:
Runnable

public class MainThread extends Thread
The main async task for Fabled functions
  • Constructor Details

    • MainThread

      public MainThread()
      Sets up the main thread
  • Method Details

    • run

      public void run()
      Runs the thread until disabled or interrupted
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • disable

      public void disable()
      Disables the main thread, stopping future runs
    • register

      public static void register(IThreadTask task)
      Registers a new task to run
      Parameters:
      task - task to run