-
Hello, I am working on a scenario where a lot of TcpStreams (up to 256) need to run concurrently. let addr = "127.0.0.1:3000";
let stream = TcpStream::connect(addr).await?; I am not sure if i am doing something wrong or if there are better ways to spawn that many connections. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It sounds like your application is doing something somewhere that blocks the thread. What exactly that is is hard to say — The |
Beta Was this translation helpful? Give feedback.
-
If you can get an MCRE (minimum complete, reproducible example) showing this, it would help us find where exactly you are blocking. |
Beta Was this translation helpful? Give feedback.
It sounds like your application is doing something somewhere that blocks the thread. What exactly that is is hard to say — The
tokio::net::TcpStream::connect
call does not do that.