-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for pervasive timeouts #315
Comments
Indeed, and we had a PR offering timeouts, but the IO reform currently means there is no API to do so for TcpStreams. |
There is now going to be a stable way to timeout on condition variables, so we could implement something. |
Link? On Wed, Apr 1, 2015, 2:13 PM Jonathan Reem notifications@github.com wrote:
|
I see. So, to support a timeout using those, I imagine having to kick off 2 threads, one that is parked for X ms, the other that tries to Doesn't sound cheap... |
If you're not happy using |
Once |
Yep! I'd like to try to start nowish on an API, and put it behind a Cargo feature |
While these methods are marked unstable in libstd, this is behind a feature flag, `timeouts`. The Client and Server both have `set_read_timeout` and `set_write_timeout` methods, that will affect all connections with that entity. BREAKING CHANGE: Any custom implementation of NetworkStream must now implement `set_read_timeout` and `set_write_timeout`, so those will break. Most users who only use the provided streams should work with no changes needed. Closes #315
We need to provide timeouts for all of our blocking APIs and ways to set timeouts for all internal blocking actions.
The text was updated successfully, but these errors were encountered: