Interface MainThreadExecutor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MainThreadExecutor
Runs a task on the host's main/render thread. Mirrors a game loop's execute(Runnable) hook (for example Minecraft#execute). The library uses it to marshal texture uploads and any other render-thread-only work off background threads.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Schedules task to run on the main thread.
  • Method Details

    • execute

      void execute(Runnable task)
      Schedules task to run on the main thread.
      Parameters:
      task - the work to run
      Since:
      0.1.0