I’d like to be able to create a glommio::net::TcpListener directly from a pre-configured std::net::TcpListener (or socket2::Socket) to set options like SO_REUSEPORT and other low-level socket parameters. Currently, from_raw_fd works, but it requires unsafe code.
It would be helpful to have a safe, ergonomic API for constructing a Glommio listener from an existing standard listener to enable fine-grained socket configuration.
Wouldn’t this be a rather trivial use case? I suppose it might be worth submitting a PR for it.
On a related note, @alice, how efficiently can we implement a thread-per-core model in Tokio? I’ve attempted to do so by spawning n threads and running a current_thread runtime inside each one. As I’m relatively new to async Rust, are there any potential pitfalls I should be aware of, or is this approach generally not how Tokio is intended to be used?
I am currently working on a shared-nothing architecture. Since work stealing is not applicable in this context, I have been reconsidering the use of Tokio as the asynchronous runtime.