public override void onCompletion <T1>(CountedCompleter <T1> caller) { if (Node != null) { // Dump buffered elements from this leaf into the sink Node.ForEach(Action); Node = null; } else if (Spliterator != null) { // Dump elements output from this leaf's pipeline into the sink Helper.WrapAndCopyInto(Action, Spliterator); Spliterator = null; } // The completion of this task *and* the dumping of elements // "happens-before" completion of the associated left-most leaf task // of right subtree (if any, which can be this task's right sibling) // ForEachOrderedTask <S, T> leftDescendant = CompletionMap.Remove(this); if (leftDescendant != null) { leftDescendant.TryComplete(); } }
public override Boolean evaluateSequential<S>(PipelineHelper<T> helper, Spliterator<S> spliterator) { return helper.WrapAndCopyInto(SinkSupplier.Get(), spliterator).AndClearState; }
public override O evaluateSequential <S>(PipelineHelper <T> helper, Spliterator <S> spliterator) { O result = helper.WrapAndCopyInto(SinkSupplier.Get(), spliterator).get(); return(result != null ? result : EmptyValue); }
public override R evaluateSequential <P_IN>(PipelineHelper <T> helper, Spliterator <P_IN> spliterator) { return(helper.WrapAndCopyInto(MakeSink(), spliterator).get()); }