@@ -158,8 +158,8 @@ fn _flume_bounded_sync(bound: usize, tx_count: usize, rx_count: usize, msg_count
158158 assert ! ( recv_counter. load( Ordering :: Acquire ) >= msg_count) ;
159159}
160160
161- async fn _flume_unbounded_async ( bound : usize , tx_count : usize , rx_count : usize , msg_count : usize ) {
162- let ( tx, rx) = flume:: bounded ( bound ) ;
161+ async fn _flume_unbounded_async ( tx_count : usize , rx_count : usize , msg_count : usize ) {
162+ let ( tx, rx) = flume:: unbounded ( ) ;
163163 let counter = Arc :: new ( AtomicUsize :: new ( 0 ) ) ;
164164 let mut th_s = Vec :: new ( ) ;
165165 for _tx_i in 0 ..tx_count {
@@ -476,15 +476,15 @@ fn bench_flume_unbounded_async(c: &mut Criterion) {
476476 group. throughput ( Throughput :: Elements ( ONE_MILLION as u64 ) ) ;
477477 group. bench_with_input ( BenchmarkId :: new ( "mpsc unbounded" , & param) , & param, |b, i| {
478478 b. to_async ( get_runtime ( ) )
479- . iter ( || _flume_unbounded_async ( 100 , i. tx_count , i. rx_count , ONE_MILLION ) )
479+ . iter ( || _flume_unbounded_async ( i. tx_count , i. rx_count , ONE_MILLION ) )
480480 } ) ;
481481 }
482482 for input in [ ( 2 , 2 ) , ( 4 , 4 ) , ( 8 , 8 ) , ( 16 , 16 ) ] {
483483 let param = Concurrency { tx_count : input. 0 , rx_count : input. 1 } ;
484484 group. throughput ( Throughput :: Elements ( ONE_MILLION as u64 ) ) ;
485485 group. bench_with_input ( BenchmarkId :: new ( "mpmc unbounded" , & param) , & param, |b, i| {
486486 b. to_async ( get_runtime ( ) )
487- . iter ( || _flume_unbounded_async ( 100 , i. tx_count , i. rx_count , ONE_MILLION ) )
487+ . iter ( || _flume_unbounded_async ( i. tx_count , i. rx_count , ONE_MILLION ) )
488488 } ) ;
489489 }
490490}
0 commit comments