Package org.apfloat.samples
Class PiParallel.ThreadLimitedOperation<T>
- java.lang.Object
-
- org.apfloat.samples.PiParallel.ThreadLimitedOperation<T>
-
- All Implemented Interfaces:
Serializable
,Operation<T>
- Enclosing class:
- PiParallel
protected static class PiParallel.ThreadLimitedOperation<T> extends Object implements Operation<T>
Class to execute operations while settingApfloatContext.setNumberOfProcessors(int)
to some value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ThreadLimitedOperation(Operation<T> operation, int numberOfProcessors)
Wrap an existing operation to a thread limited context.
-
-
-
Constructor Detail
-
ThreadLimitedOperation
public ThreadLimitedOperation(Operation<T> operation, int numberOfProcessors)
Wrap an existing operation to a thread limited context.- Parameters:
operation
- The operation whose execution will have a limited number of threads available.numberOfProcessors
- The maximum number of threads that can be used in the execution.
-
-