Method ConcurrentMerge
ConcurrentMerge<TSource>(IAsyncEnumerable<TSource>, params IAsyncEnumerable<TSource>[])
Concurrently iterates multiple IAsync
Declaration
public static IAsyncEnumerable<TSource> ConcurrentMerge<TSource>(this IAsyncEnumerable<TSource> source, params IAsyncEnumerable<TSource>[] otherSources)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The first sequence to merge together |
IAsync |
otherSources | The other sequences to merge together |
Returns
Type | Description |
---|---|
IAsync |
A sequence of every element from all source sequences, returned in an order based on how long it takes to iterate each element. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of the source sequences |
Remarks
This method is very similar to Interleave<T>(IAsync
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
|
Argument |
Any of the items in |
ConcurrentMerge<TSource>(IEnumerable<IAsyncEnumerable<TSource>>)
Concurrently iterates multiple IAsync
Declaration
public static IAsyncEnumerable<TSource> ConcurrentMerge<TSource>(this IEnumerable<IAsyncEnumerable<TSource>> sources)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IAsync |
sources | The sequence of sequences to merge together |
Returns
Type | Description |
---|---|
IAsync |
A sequence of every element from all source sequences, returned in an order based on how long it takes to iterate each element. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of the source sequences |
Remarks
This method is very similar to Interleave<T>(IAsync
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
Any of the items in |
ConcurrentMerge<TSource>(IEnumerable<IAsyncEnumerable<TSource>>, int)
Concurrently iterates multiple IAsync
Declaration
public static IAsyncEnumerable<TSource> ConcurrentMerge<TSource>(this IEnumerable<IAsyncEnumerable<TSource>> sources, int maxConcurrency)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IAsync |
sources | The sequence of sequences to merge together |
int | maxConcurrency | The maximum number of outstanding iteration operations allowed at any given time. |
Returns
Type | Description |
---|---|
IAsync |
A sequence of every element from all source sequences, returned in an order based on how long it takes to iterate each element. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of the source sequences |
Remarks
This method is very similar to Interleave<T>(IAsync
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
Any of the items in |