Class Runner

All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService

public final class Runner extends AbstractExecutorService
Implements an unbounded pool of daemon threads which automatically exit when idle. Intended as a faster alternative to launching new threads, but not as fast as a work stealing pool.
  • Method Details

    • start

      public static void start(Runnable command)
    • start

      public static void start(String namePrefix, Runnable command)
      Parameters:
      namePrefix - name prefix to assign to the thread
    • current

      public static Runner current()
      Return an executor for the current thread's group.
    • execute

      public void execute(Runnable task)
    • shutdown

      public void shutdown()
      Does nothing.
    • shutdownNow

      public List<Runnable> shutdownNow()
      Does nothing.
      Returns:
      empty list
    • isShutdown

      public boolean isShutdown()
      Returns:
      false
    • isTerminated

      public boolean isTerminated()
      Returns:
      false
    • awaitTermination

      public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
      Returns:
      false
      Throws:
      InterruptedException