Exemplo n.º 1
0
 public static IAsyncEnumerator <T> ProcessAsynchronouslyUsingUnboundedChannel <T>(this IAsyncEnumerator <T> enumerator) =>
 enumerator.ProcessAsynchronouslyUsingChannel(Channel.CreateUnbounded <T>(new UnboundedChannelOptions {
     SingleReader = true, SingleWriter = true
 }));
Exemplo 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
 }));