]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #15704 : alexcrichton/rust/issue-15595, r=brson
authorbors <bors@rust-lang.org>
Mon, 25 Aug 2014 01:45:57 +0000 (01:45 +0000)
committerbors <bors@rust-lang.org>
Mon, 25 Aug 2014 01:45:57 +0000 (01:45 +0000)
If a task is spinning in an accept loop, there is currently no method of gracefully shutting it down. This PR introduces a way to do so by cloning the acceptor and implementing a close_accept method to unblocking any pending acceptor.

As with other I/O methods like this, it is `#[experimental]` from the start and sadly carries with it a good deal of code to support it. Much of the complication is from the fact that you can now concurrently accept on the same socket.

I tried to add a good deal of tests for this change, but another set of eyes is always appreciated!


Trivial merge