Esempio n. 1
0
 public static IAsyncEnumerator <T> ProcessAsynchronouslyUsingUnboundedChannel <T>(this IAsyncEnumerator <T> enumerator) =>
 enumerator.ProcessAsynchronouslyUsingChannel(Channel.CreateUnbounded <T>(new UnboundedChannelOptions {
     SingleReader = true, SingleWriter = true
 }));
Esempio n. 2
0
 public static IAsyncEnumerator <T> ProcessAsynchronouslyUsingBoundedChannel <T>(this IAsyncEnumerator <T> enumerator, int bufferSize) =>
 enumerator.ProcessAsynchronouslyUsingChannel(Channel.CreateBounded <T>(new BoundedChannelOptions(bufferSize)
 {
     SingleReader = true, SingleWriter = true
 }));