> Waking up on timeout is hardly a good decision. Let's think about
> thousands of connections, each waking up at a reasonable timeouts
> (sometimes between 100 ms to 1 sec for my taste). The close_read is a
> hack that doesn't work for many cases (listening sockets, pipes, SCTP
> sockets, etc.)
>
> I'm not sure what the API should be. A way to poll on two sockets, or
> on socket and channel simultaneously may work for me. Similarly it may
> be an ability to kill the task. Or a way to send an interruption
> signal (similar to EINTR).

I agree that waking up a task arbitrarily blocked at any location is
quite useful. It is also a significant amount of implementation to do
so, and we do not plan on doing so at this time. Things like selection
over sockets would likely come with an async I/O library which is
planned for post-1.0
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to