[phobos] [D-Programming-Language/phobos] 2d9415: Fix Document of process.d with pipe
GitHub via phobos
phobos at puremagic.com
Wed Feb 17 12:33:59 PST 2016
Branch: refs/heads/master
Home: https://github.com/D-Programming-Language/phobos
Commit: 2d9415dea84d08f49d393b7a81d8807478dd0a01
https://github.com/D-Programming-Language/phobos/commit/2d9415dea84d08f49d393b7a81d8807478dd0a01
Author: Akihiro Shoji <alpha.kai.net at alpha-kai-net.info>
Date: 2016-02-15 (Mon, 15 Feb 2016)
Changed paths:
M std/process.d
Log Message:
-----------
Fix Document of process.d with pipe
Current document says:
```d
auto p = pipe();
p.writeEnd.writeln("Hello World");
assert (p.readEnd.readln().chomp() == "Hello World");
```
This means that buffer is yet to be flushed.
Therefore `p.readEnd.readln` can't recieve the input, for readln waits forever if the buffer is not flushed.
Then I fixed as follow:
```d
auto p = pipe();
p.writeEnd.writeln("Hello World");
p.writeEnd.flush();
assert (p.readEnd.readln().chomp() == "Hello World");
```
Commit: 32f032fe65fd6362fcf7542b9b4bc66d531cf321
https://github.com/D-Programming-Language/phobos/commit/32f032fe65fd6362fcf7542b9b4bc66d531cf321
Author: H. S. Teoh <hsteoh at quickfur.ath.cx>
Date: 2016-02-17 (Wed, 17 Feb 2016)
Changed paths:
M std/process.d
Log Message:
-----------
Merge pull request #4001 from alphaKAI/patch-1
Fix Document of process.d with pipe
Compare: https://github.com/D-Programming-Language/phobos/compare/25aae210491f...32f032fe65fd
More information about the phobos
mailing list