Skip to content

Force timeout on potentially blocking IO calls #607

@0b01

Description

@0b01

Recently I encountered a bug where when a buffer associated with a file descriptor(TcpStream) is filled, stream.write will block forever. Bugs of this nature are very hard to find.

std::net::TcpStream have functions such as set_write_timeout, set_read_timeout in addition to set_nonblocking. I believe async-std would benefit by including a similar set_write_timeout function on potentially blocking IO functions so write would return a TimeoutFuture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions