Lines Matching refs:task

287             ForEachTask<S, T> task = this;
291 task.helper.copyInto(taskSink, rightSplit);
294 ForEachTask<S, T> leftTask = new ForEachTask<>(task, leftSplit);
295 task.addToPendingCount(1);
300 taskToFork = task;
301 task = leftTask;
310 task.spliterator = null;
311 task.propagateCompletion();
322 * Our goal is to ensure that the elements associated with a task are
325 * a task does not complete until all the tasks preceding it in this
327 * task in this order for any left child. We increase the pending count
403 private static <S, T> void doCompute(ForEachOrderedTask<S, T> task) {
404 Spliterator<S> rightSplit = task.spliterator, leftSplit;
405 long sizeThreshold = task.targetSize;
410 new ForEachOrderedTask<>(task, leftSplit, task.leftPredecessor);
412 new ForEachOrderedTask<>(task, rightSplit, leftChild);
414 // Fork the parent task
417 task.addToPendingCount(1);
421 task.completionMap.put(leftChild, rightChild);
423 // If task is not on the left spine
424 if (task.leftPredecessor != null) {
437 if (task.completionMap.replace(task.leftPredecessor, task, leftChild)) {
440 task.addToPendingCount(-1);
453 task = leftChild;
458 task = rightChild;
466 * map will contain a value that is task, and two calls to
468 * triggered by the completion of task's left-predecessor in
472 if (task.getPendingCount() > 0) {
477 Node.Builder<T> nb = task.helper.makeNodeBuilder(
478 task.helper.exactOutputSizeIfKnown(rightSplit),
480 task.node = task.helper.wrapAndCopyInto(nb, rightSplit).build();
481 task.spliterator = null;
483 task.tryComplete();
499 // The completion of this task *and* the dumping of elements
500 // "happens-before" completion of the associated left-most leaf task
501 // of right subtree (if any, which can be this task's right sibling)