Interface PApplet.MainThreadContext

  • Enclosing class:
    PApplet

    public static interface PApplet.MainThreadContext
    A context for running tasks on the main (first) thread of the application. On some OS it is important that various UI operations are handled on this thread. To access the main thread context use PApplet.mainThread().
    • Method Detail

      • runLater

        void runLater​(Runnable task)
        Run the provided task asynchronously on the main thread.
        Parameters:
        task - runnable task
      • isMainThread

        boolean isMainThread()
        Query whether the current thread is the main thread.
        Returns:
        true if current thread is main thread