Skip to content

Add timeout support #31

Open
rust-lang/rust
#73269
@jethrogb

Description

@jethrogb

The following operations in std require some form of timeout support:

  • TcpStream::connect_timeout
  • TcpStream::set_read_timeout
  • TcpStream::set_write_timeout
  • thread::sleep
  • thread::sleep_ms
  • thread::park_timeout
  • thread::park_timeout_ms
  • Condvar::wait_timeout
  • mpsc::Receiver::recv_timeout

Currently, the first just doesn't use a timeout, and the rest errors/panics.

The ABI currently does not support waiting a specified amount (only no wait or indefinite wait): https://docs.rs/fortanix-sgx-abi/0.1.0-rc1/fortanix_sgx_abi/struct.Usercalls.html#method.wait . It's also not clear if timeouts make sense in SGX setting, in particular: is it the case that users depend on accurate timeouts for security purposes?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions