org.apfloat.internal
Class ParallelRunner
java.lang.Object
org.apfloat.internal.ParallelRunner
public class ParallelRunner
- extends Object
Class for running Runnable objects in parallel using
multiple threads.
- Since:
- 1.1
- Version:
- 1.2.1
- Author:
- Mikko Tommila
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
runParallel
public static void runParallel(ParallelRunnable parallelRunnable)
throws ApfloatRuntimeException
- Run Runnable objects in parallel.
The whole length of the ParallelRunnable is split to multiple strides.
The number of strides is the number of processors from
ApfloatContext.getNumberOfProcessors(). The Runnable for processing
each stride is run in parallel using the ExecutorService retrieved from
ApfloatContext.getExecutorService().
- Parameters:
parallelRunnable - The ParallelRunnable containing the Runnable objects to be run.
- Throws:
ApfloatRuntimeException