Class Concurrency

java.lang.Object
io.jenetics.internal.util.Concurrency
All Implemented Interfaces:
AutoCloseable, Executor

public abstract class Concurrency extends Object implements Executor, AutoCloseable
Since:
2.0
Version:
3.8
  • Field Details

  • Constructor Details

  • Method Details

    • execute

      public abstract void execute(Seq<? extends Runnable> runnables)
    • close

      public abstract void close()
      Specified by:
      close in interface AutoCloseable
    • getInnerExecutor

      Return the underlying Executor, which is used for performing the actual task execution.
      Returns:
      the underlying Executor object
    • with

      public static Concurrency with(Executor executor)
      Return an new Concurrency object from the given executor.
      Parameters:
      executor - the underlying Executor
      Returns:
      a new Concurrency object
    • withCommonPool

      public static Concurrency withCommonPool()
      Return a new Concurrency object using the common ForkJoinPool.
      Returns:
      a new Concurrency object using the new ForkJoinPool