public class MulticoreExecutor
extends java.lang.Object
Constructor and Description |
---|
MulticoreExecutor() |
Modifier and Type | Method and Description |
---|---|
static int |
getThreadPoolSize()
Returns the number of threads in the thread pool.
|
static <T> java.util.List<T> |
run(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
Executes the given tasks serially or parallel depending on the number
of cores of the system.
|
static void |
shutdown()
Shutdown the thread pool.
|
public static int getThreadPoolSize()
public static <T> java.util.List<T> run(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.Exception
tasks
- the collection of tasks.java.lang.Exception
- if unable to compute a result.public static void shutdown()