Class JmcExecutors

java.lang.Object
org.mpi_sws.jmc.api.util.concurrent.JmcExecutors

public class JmcExecutors extends Object
A replacement for Executors. Currently only supports a `newSingleThreadExecutor` and `newFixedThreadPool` methods, which return instances of JmcExecutorService.
  • Constructor Details

    • JmcExecutors

      public JmcExecutors()
  • Method Details

    • newSingleThreadExecutor

      public static ExecutorService newSingleThreadExecutor()
      Creates a single-threaded executor that uses a JMC executor service.
      Returns:
      a new single-threaded executor
    • newFixedThreadPool

      public static ExecutorService newFixedThreadPool(int nThreads)
      Creates a fixed thread pool with the specified number of threads that uses a JMC executor service.
      Parameters:
      nThreads - the number of threads in the pool
      Returns:
      a new fixed thread pool executor