馃憢 Hey there! I’m Tahmid.
Currently, I’m working at AWS improving latency observability under Elastic Block Store.
Previously, I worked at Stripe automating build file management and improving developer experience.
You鈥檙e using io_uring, and you want to know whether to use the IOSQE_AYSNC flag. Read, the man pages, they say! Normal operation for io_uring is to try and issue an sqe as non-blocking first, and if that fails, execute it in an async manner. To support more efficient overlapped operation of requests that the application knows/assumes will always (or most of the time) block, the application can ask for an sqe to be issued async from the start. Note that this flag immediately causes the SQE to be offloaded to an async helper thread with no initial non-blocking attempt. This may be less efficient and should not be used liberally or without understanding the performance and efficiency tradeoffs. ...
I love using Rust, and it does lots of things right. But sometimes I wish it was better. clone() + async move Asynchronous code lets you run tasks concurrently. Maybe that looks something like this: let listener = TcpListener::bind("127.0.0.1:8080").await?; tokio::spawn(async { loop { let (socket, _) = listener .accept() .await .expect("failed to accept connection"); // handle the incoming TcpStream... } }); // go do something else... except: ...