about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-23 19:21:33 -0700
committerbors <bors@rust-lang.org>2014-04-23 19:21:33 -0700
commit3d05e7f9cdd76887de75f46b5e47d2685bec6520 (patch)
tree56e20faec42ce4ff66a2fdf0e7d92fa8ea1e55a1 /src/rustllvm/RustWrapper.cpp
parentd9103301726a4d91c622f8ae3d2d10ad225a0f65 (diff)
parente5d3e5180f667f8850cdd96af60fc5511746b1bd (diff)
downloadrust-3d05e7f9cdd76887de75f46b5e47d2685bec6520.tar.gz
rust-3d05e7f9cdd76887de75f46b5e47d2685bec6520.zip
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions