File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,11 @@ async fn main() -> anyhow::Result<()> {
4545 . build ( ) ,
4646 ) ?;
4747
48- let stream = client. start ( ) . await ?;
48+ let stream = client
49+ . start (
50+ 1000 , // Use a channel capacity of 1000
51+ )
52+ . await ?;
4953 pin ! ( stream) ;
5054
5155 let subscription_requests = vec ! [
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ impl PythLazerClient {
5555 } )
5656 }
5757
58- pub async fn start ( & mut self ) -> Result < mpsc:: Receiver < AnyResponse > > {
59- let ( sender, receiver) = mpsc:: channel :: < AnyResponse > ( CHANNEL_CAPACITY ) ;
58+ pub async fn start ( & mut self , channel_capacity : usize ) -> Result < mpsc:: Receiver < AnyResponse > > {
59+ let ( sender, receiver) = mpsc:: channel :: < AnyResponse > ( channel_capacity ) ;
6060
6161 for i in 0 ..self . num_connections {
6262 let endpoint = self . endpoints [ i % self . endpoints . len ( ) ] . clone ( ) ;
You can’t perform that action at this time.
0 commit comments