Class PassthroughRunner

java.lang.Object
org.ngengine.runner.PassthroughRunner
All Implemented Interfaces:
Runner

public class PassthroughRunner extends Object implements Runner
This is a fake runner, it will just run the task in the current thread immediately. Used for debugging and testing purposes.
  • Constructor Details

    • PassthroughRunner

      public PassthroughRunner()
  • Method Details

    • run

      public void run(Runnable task)
      Description copied from interface: Runner
      Run a task in the runner's thread, asap.
      Specified by:
      run in interface Runner
      Parameters:
      task -
    • enqueue

      public void enqueue(Runnable task)
      Description copied from interface: Runner
      Enqueue a task to be run in the runner's thread. This is the same as Runner.run(Runnable) but the task will be enqueued even if the call happens in the runner's thread.

      Generally, this is useful only for special use cases, like ensuring the thread doesn't get overloaded with too many tasks all at once. Otherwise just use Runner.run(Runnable).

      Specified by:
      enqueue in interface Runner
      Parameters:
      task -