rust/src/libstd/rt
bors 3d05e7f9cd auto merge of #13688 : alexcrichton/rust/accept-timeout, r=brson
This adds experimental support for timeouts when accepting sockets through
`TcpAcceptor::accept`. This does not add a separate `accept_timeout` function,
but rather it adds a `set_timeout` function instead. This second function is
intended to be used as a hard deadline after which all accepts will never block
and fail immediately.

This idea was derived from Go's SetDeadline() methods. We do not currently have
a robust time abstraction in the standard library, so I opted to have the
argument be a relative time in millseconds into the future. I believe a more
appropriate argument type is an absolute time, but this concept does not exist
yet (this is also why the function is marked #[experimental]).

The native support is built on select(), similarly to connect_timeout(), and the
green support is based on channel select and a timer.

cc #13523
2014-04-23 19:21:33 -07:00
..
args.rs Replace all ~"" with "".to_owned() 2014-04-18 17:25:34 -07:00
at_exit_imp.rs std,serialize: remove some internal uses of ~[]. 2014-04-10 15:21:58 -07:00
backtrace.rs Fixed Win64 build 2014-04-22 18:08:06 -07:00
bookkeeping.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
env.rs Register new snapshots 2014-02-14 22:55:20 -08:00
global_heap.rs libtest: rename BenchHarness to Bencher 2014-04-11 17:31:13 +08:00
libunwind.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
local.rs Publicise types/add #[allow(visible_private_types)] to a variety of places. 2014-03-01 00:12:34 +11:00
local_heap.rs std: Impl Deref/DerefMut for a borrowed task 2014-04-15 19:45:00 -07:00
local_ptr.rs Fix misspellings in comments. 2014-04-21 00:49:39 -04:00
macros.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
mod.rs Fixed Win64 build 2014-04-22 18:08:06 -07:00
rtio.rs std: Add support for an accept() timeout 2014-04-23 19:07:31 -07:00
stack.rs std: Tweak stack overflow printing for robustness 2014-02-25 16:51:52 -08:00
task.rs std: Change Finally to take &mut self 2014-04-23 10:03:43 -07:00
thread.rs std: Fail more gracefully on thread spawn errors 2014-04-18 10:36:16 -07:00
thread_local_storage.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
unwind.rs std: Switch field privacy as necessary 2014-03-31 15:17:12 -07:00
util.rs Fixed Win64 build 2014-04-22 18:08:06 -07:00