@@ -36,7 +36,7 @@ static async Task Main()
3636 {
3737 Console . WriteLine ( "Standard Channel filter test..." ) ;
3838 System . Collections . Generic . IEnumerable < ValueTask < int > > source = Enumerable
39- . Repeat ( ( Func < int , ValueTask < int > > ) Delay , repeat )
39+ . Repeat ( Delay , repeat )
4040 . Select ( ( t , i ) => t ( i ) ) ;
4141
4242 var sw = Stopwatch . StartNew ( ) ;
@@ -68,7 +68,7 @@ static async Task Main()
6868 Console . WriteLine ( "Concurrent Channel operation test..." ) ;
6969 var sw = Stopwatch . StartNew ( ) ;
7070 await Enumerable
71- . Repeat ( ( Func < int , ValueTask < int > > ) Delay , repeat )
71+ . Repeat ( Delay , repeat )
7272 . Select ( ( t , i ) => t ( i ) )
7373 . ToChannelAsync ( singleReader : false , maxConcurrency : concurrency )
7474 . ReadAllConcurrently ( 4 , Dummy ) . ConfigureAwait ( false ) ;
@@ -81,7 +81,7 @@ await Enumerable
8181 Console . WriteLine ( "Pipe operation test..." ) ;
8282 var sw = Stopwatch . StartNew ( ) ;
8383 long total = await Enumerable
84- . Repeat ( ( Func < int , ValueTask < int > > ) Delay , repeat )
84+ . Repeat ( Delay , repeat )
8585 . Select ( ( t , i ) => t ( i ) )
8686 . ToChannelAsync ( )
8787 . Pipe ( i => i * 2 )
@@ -96,7 +96,7 @@ await Enumerable
9696 Console . WriteLine ( "Transform operation test..." ) ;
9797 var sw = Stopwatch . StartNew ( ) ;
9898 await Enumerable
99- . Repeat ( ( Func < int , ValueTask < int > > ) Delay , repeat )
99+ . Repeat ( Delay , repeat )
100100 . Select ( ( t , i ) => t ( i ) )
101101 . ToChannelAsync ( )
102102 . Transform ( i => i * 2L )
@@ -110,16 +110,18 @@ await Enumerable
110110 Console . WriteLine ( "Async Enumerable test..." ) ;
111111 var sw = Stopwatch . StartNew ( ) ;
112112 await foreach ( var e in Enumerable
113- . Repeat ( ( Func < int , ValueTask < int > > ) Delay , repeat )
113+ . Repeat ( Delay , repeat )
114114 . Select ( ( t , i ) => t ( i ) )
115115 . ToChannelAsync ( )
116- . ReadAllAsync ( ) )
116+ . ReadAllAsync ( ) . ConfigureAwait ( false ) )
117+ {
117118 Dummy ( e ) ;
119+ }
120+
118121 sw . Stop ( ) ;
119122 Console . WriteLine ( sw . Elapsed ) ;
120123 Console . WriteLine ( ) ;
121124 }
122-
123125 }
124126
125127 static void Dummy ( int i )
0 commit comments