Skip to content

io: undocumented behavioral divergence between std::io and embedded-io. #694

@Conaclos

Description

@Conaclos

While I was working on the code base of embedded-io, I noticed some behavioral divergences between the default implementation of std::io::Read::read_exact and embedded-io::Read::read_exact. The first retries to read the source every time that an error with an ErrorKind::Interrupted kind is caught, while the latter fails as soon as a ErrorKind::Interrupted is yield by the source.

Is this intentional?
TBH, I am a bit surprised by the std::io choice because read doesn't retry to read.
This creates some inconsistencies between read and read_exact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions