Skip to content

Pipes example is a bit misleading w.r.t. wc processing. #1915

Open
@kareled

Description

@kareled

Hello,

    // Because `stdin` does not live after the above calls, it is `drop`ed,
    // and the pipe is closed.
    //
    // This is very important, otherwise `wc` wouldn't start processing the
    // input we just sent.

the second part of the comment is a bit misleading since from the time we start wc, it processes data immediately. We need to close the pipe in order
to actually enforce wc to know its end of its business hence printing the sums to the output.

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