public class TaskGroup extends RecursiveAction
A group of tasks to be executed in a fork-join tree.
Constructor and Description |
---|
TaskGroup(boolean par)
Create a new task group.
|
Modifier and Type | Method and Description |
---|---|
void |
addTask(ForkJoinTask<?> task)
Add a task to be executed.
|
protected void |
compute() |
boolean |
isParallel()
Query whether the subtasks will be run in parallel.
|
exec, getRawResult, setRawResult
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
public TaskGroup(boolean par)
Create a new task group.
par
- true
to execute the subtasks in parallel.public boolean isParallel()
Query whether the subtasks will be run in parallel.
true
if the subtasks are run in parallel.public void addTask(ForkJoinTask<?> task)
Add a task to be executed.
task
- The task to execute.protected void compute()
compute
in class RecursiveAction