Skip to content

read, write return value when n == buffer_size(buffers) #257

@pdimov

Description

@pdimov

High level composition algorithms such as when_any and when_all need to be able to distinguish, in a generic manner, between success and failure of their subtasks. However, the case in which read or write returns [ec, n] when ec denotes failure, but n is equal to the requested amount of bytes to transfer, appears like an error to the generic observer, but is actually a success (and needs to be treated as one by high level compositions.)

For this reason, read and write need to be constrained to always return a successful ec when n equals buffer_size(buffers).

This also has implications for read_some and write_some, in terms of which read and write are implemented.

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