示例#1
0
            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();
                }
            }
示例#2
0
			public override Boolean evaluateSequential<S>(PipelineHelper<T> helper, Spliterator<S> spliterator)
			{
				return helper.WrapAndCopyInto(SinkSupplier.Get(), spliterator).AndClearState;
			}
示例#3
0
            public override O evaluateSequential <S>(PipelineHelper <T> helper, Spliterator <S> spliterator)
            {
                O result = helper.WrapAndCopyInto(SinkSupplier.Get(), spliterator).get();

                return(result != null ? result : EmptyValue);
            }
示例#4
0
 public override R evaluateSequential <P_IN>(PipelineHelper <T> helper, Spliterator <P_IN> spliterator)
 {
     return(helper.WrapAndCopyInto(MakeSink(), spliterator).get());
 }