Interface PluginTaskAction

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 PluginTaskAction
The unit of work a plugin hands to the task scheduler.

Runs on a scheduler-owned worker thread, never on the Cubism host thread; an implementation that needs to touch Editor state must hop back to the host thread itself. Implementations are expected to poll the supplied token and return early once cancellation is requested, since the scheduler cannot interrupt work that ignores it.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(CancellationToken cancellationToken)
    Performs the work.
  • Method Details

    • run

      void run(CancellationToken cancellationToken) throws Exception
      Performs the work.
      Parameters:
      cancellationToken - token the action should poll so a cancelled task stops promptly
      Throws:
      Exception - any failure; the scheduler records it as a failed run rather than propagating it to the caller that submitted the task