Class JmcExecutors
java.lang.Object
org.mpi_sws.jmc.api.util.concurrent.JmcExecutors
A replacement for
Executors. Currently only supports a
`newSingleThreadExecutor` and `newFixedThreadPool` methods, which return instances of JmcExecutorService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorServicenewFixedThreadPool(int nThreads) Creates a fixed thread pool with the specified number of threads that uses a JMC executor service.static ExecutorServiceCreates a single-threaded executor that uses a JMC executor service.
-
Constructor Details
-
JmcExecutors
public JmcExecutors()
-
-
Method Details
-
newSingleThreadExecutor
Creates a single-threaded executor that uses a JMC executor service.- Returns:
- a new single-threaded executor
-
newFixedThreadPool
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
-