]> git.lizzy.rs Git - rust.git/commit
auto merge of #13814 : alexcrichton/rust/read-timeout, r=brson
authorbors <bors@rust-lang.org>
Thu, 8 May 2014 07:01:41 +0000 (00:01 -0700)
committerbors <bors@rust-lang.org>
Thu, 8 May 2014 07:01:41 +0000 (00:01 -0700)
commitc39b1cb1bed78d989b1011f54f6febb7e9e46d94
tree0f7ecbfb7edaa18fe4c4036a719fd969a076d414
parent26632d541c3f548b064ffea57f0cb2057b48f947
parent418f197351fbc570a0e7bbf93d509cd44f988467
auto merge of #13814 : alexcrichton/rust/read-timeout, r=brson

This PR is an implementation of `set_timeout`, `set_read_timeout`, and `set_write_timeout` for TCP, UDP, and Unix streams (named pipes on windows).

The implementation was much more difficult than I imagined it was going to be throughout the 9 categories ({tcp, udp, unix} x {windows, unix, green}). The major snag is that libuv doesn't support canceling writes, so I chose to word the `set_write_timeout` documentation in such a way that it accomadates the behavior seen when running around with libgreen.

The first commit is from #13751, and I just included it to pre-emptively avoid rebase conflicts. The following commits are relevant to this PR. The tests aren't quite passing on windows just yet, but I should have those working by tomorrow once my VM is back up and running. For now, I wanted to see what others' thoughts were on this strategy.