Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DefaultMergeHelper()

System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >.DefaultMergeHelper ( PartitionedStream< TInputOutput, TIgnoreKey > partitions,
bool ignoreOutput,
ParallelMergeOptions options,
TaskScheduler taskScheduler,
CancellationState cancellationState,
int queryId )
inlinepackage

Definition at line 22 of file DefaultMergeHelper.cs.

23 {
24 _taskGroupState = new QueryTaskGroupState(cancellationState, queryId);
28 IntValueEvent consumerEvent = new IntValueEvent();
29 if (ignoreOutput)
30 {
31 return;
32 }
33 if (options != ParallelMergeOptions.FullyBuffered)
34 {
35 if (partitions.PartitionCount > 1)
36 {
37 _asyncChannels = MergeExecutor<TInputOutput>.MakeAsynchronousChannels(partitions.PartitionCount, options, consumerEvent, cancellationState.MergedCancellationToken);
39 }
40 else
41 {
42 _channelEnumerator = ExceptionAggregator.WrapQueryEnumerator(partitions[0], _taskGroupState.CancellationState).GetEnumerator();
43 }
44 }
45 else
46 {
47 _syncChannels = MergeExecutor<TInputOutput>.MakeSynchronousChannels(partitions.PartitionCount);
49 }
50 }
readonly PartitionedStream< TInputOutput, TIgnoreKey > _partitions
readonly SynchronousChannel< TInputOutput >[] _syncChannels
readonly IEnumerator< TInputOutput > _channelEnumerator
readonly QueryTaskGroupState _taskGroupState
readonly AsynchronousChannel< TInputOutput >[] _asyncChannels

References System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._asyncChannels, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._channelEnumerator, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._ignoreOutput, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._partitions, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._syncChannels, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._taskGroupState, System.Linq.Parallel.DefaultMergeHelper< TInputOutput, TIgnoreKey >._taskScheduler, System.Linq.Parallel.QueryTaskGroupState.CancellationState, and System.options.