]> git.lizzy.rs Git - rust.git/commit
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)
commit83804f90852f51f043d3011657ba20c1876d2111
tree7424d32c6d1efdb5ea4dc349ddec384bd1aa105f
parent833277e2d2c7cf5fcf995ef413412a21b4756ca7
parentfd763a5b1e736df39d878b888b1bf14f2009672c
auto merge of #15704 : alexcrichton/rust/issue-15595, r=brson

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!