Class ExecutorImpl

java.lang.Object
org.smallibs.concurrent.execution.impl.ExecutorImpl
All Implemented Interfaces:
Executor

public final class ExecutorImpl extends Object implements Executor
Asynchronous execution media
  • Constructor Details

    • ExecutorImpl

      public ExecutorImpl(ExecutorService executorService)
      Constructor
      Parameters:
      executorService - The executor service used for asynchronous operation
  • Method Details

    • async

      public <T> Promise<T> async(Callable<T> task)
      Description copied from interface: Executor
      Async method
      Specified by:
      async in interface Executor
      Type Parameters:
      T - the promised value type
      Parameters:
      task - the task to be asynchronously executed
      Returns:
      a promise
    • async

      public Promise<Unit> async(Executor.RunnableWithError task)
      Description copied from interface: Executor
      Async method
      Specified by:
      async in interface Executor
      Parameters:
      task - the task to be asynchronously executed
      Returns:
      a promise