You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@@ -16,7 +16,7 @@ namespace System.Linq.Parallel
|
||||
/// This enumerator merges multiple input channels into a single output stream. The merging process just
|
||||
/// goes from left-to-right, enumerating each channel in succession in its entirety.
|
||||
/// Assumptions:
|
||||
/// Before enumerating this object, all producers for all channels must have finished enqueueing new
|
||||
/// Before enumerating this object, all producers for all channels must have finished enqueuing new
|
||||
/// elements.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace System.Linq.Parallel
|
||||
for (int i = 0; i < outputStream.PartitionCount; i++)
|
||||
{
|
||||
outputStream[i] = new SortQueryOperatorEnumerator<TInputOutput, TKey, TSortKey>(
|
||||
inputStream[i], _keySelector, _comparer);
|
||||
inputStream[i], _keySelector);
|
||||
}
|
||||
|
||||
recipient.Receive<TSortKey>(outputStream);
|
||||
@@ -185,22 +185,19 @@ namespace System.Linq.Parallel
|
||||
{
|
||||
private readonly QueryOperatorEnumerator<TInputOutput, TKey> _source; // Data source to sort.
|
||||
private readonly Func<TInputOutput, TSortKey> _keySelector; // Key selector used when sorting.
|
||||
private readonly IComparer<TSortKey> _keyComparer; // Key comparison logic to use during sorting.
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
// Instantiates a new sort operator enumerator.
|
||||
//
|
||||
|
||||
internal SortQueryOperatorEnumerator(QueryOperatorEnumerator<TInputOutput, TKey> source,
|
||||
Func<TInputOutput, TSortKey> keySelector, IComparer<TSortKey> keyComparer)
|
||||
Func<TInputOutput, TSortKey> keySelector)
|
||||
{
|
||||
Debug.Assert(source != null);
|
||||
Debug.Assert(keySelector != null, "need a key comparer");
|
||||
Debug.Assert(keyComparer != null, "expected a compiled operator");
|
||||
|
||||
_source = source;
|
||||
_keySelector = keySelector;
|
||||
_keyComparer = keyComparer;
|
||||
}
|
||||
//---------------------------------------------------------------------------------------
|
||||
// Accessor for the key comparison routine.
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace System.Linq.Parallel
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is responsible for enumerating results and enqueueing them to
|
||||
/// This method is responsible for enumerating results and enqueuing them to
|
||||
/// the output buffer as appropriate. Each base class implements its own.
|
||||
/// </summary>
|
||||
protected override void SpoolingWork()
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace System.Linq.Parallel.Tests
|
||||
/// <returns>Entries for test data.
|
||||
/// The first element is the left Labeled{ParallelQuery{int}} range, the second element is the left count,
|
||||
/// the third element is the right Labeled{ParallelQuery{int}} range, the fourth element is the right count,
|
||||
/// and the fifth is the right start..</returns>
|
||||
/// and the fifth is the right start.</returns>
|
||||
public static IEnumerable<object[]> BinaryRanges(IEnumerable<int> leftCounts, Func<int, int, int> rightStart, IEnumerable<int> rightCounts)
|
||||
{
|
||||
foreach (object[] left in Ranges(leftCounts))
|
||||
|
||||
Reference in New Issue
Block a user