Class AsyncTask

java.lang.Object
com.jackdaw.chatwithnpc.AsyncTask

public class AsyncTask extends Object
  • Field Details

  • Constructor Details

    • AsyncTask

      public AsyncTask()
  • Method Details

    • call

      public static void call(@NotNull @NotNull AsyncTask.Task task)
      Call the task asynchronously. Then call the result in main thread if it is callable.
      Parameters:
      task - The task to call.
    • isTaskQueueEmpty

      public static boolean isTaskQueueEmpty()
      Check if the task queue is empty.
      Returns:
      True if the task queue is empty.
    • pollTaskQueue

      public static AsyncTask.TaskResult pollTaskQueue()
      Poll the task queue.
      Returns:
      The task result.
    • nothingToDo

      @Contract(value=" -> new", pure=true) @NotNull public static @NotNull AsyncTask.TaskResult nothingToDo()
      Create a task result that does need to continue.
      Returns:
      The task that does nothing.