Class PiParallel.ThreadLimitedOperation<T>
java.lang.Object
org.apfloat.samples.PiParallel.ThreadLimitedOperation<T>
- All Implemented Interfaces:
Serializable, Operation<T>
- Enclosing class:
PiParallel
Class to execute operations while setting
ApfloatContext.setNumberOfProcessors(int)
to some value.- Version:
- 1.14.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionThreadLimitedOperation(Operation<T> operation, int numberOfProcessors) Wrap an existing operation to a thread limited context. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
operation
-
numberOfProcessors
private int numberOfProcessors
-
-
Constructor Details
-
ThreadLimitedOperation
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.
-
-
Method Details
-
execute
-