Class IntObjectTask<T>

java.lang.Object
java.util.concurrent.ForkJoinTask<Void>
pabeles.concurrency.IntObjectTask<T>
All Implemented Interfaces:
Serializable, Future<Void>

public class IntObjectTask<T> extends ForkJoinTask<Void>
Performs a parallel for loop with the specified step increment and a workspace for each thread. Each thread is tasked with computing the results for a specified number of iterations and it will be provided the same workspace for all iterations
See Also:
  • Constructor Details

    • IntObjectTask

      public IntObjectTask(int idx0, int idx1, int step, int maxThreads, int whichThread, GrowArray<T> workspace, IntObjectConsumer<T> consumer)
      Parameters:
      step - The amount the counter steps each iteration. Must be positive
      maxThreads - The number of threads it can spawn
      whichThread - If < 0 then it's the master thread otherwise this thread index and specifies which workspace to use
  • Method Details