[Issue 17797] [REG 2.073.2] double print to stdout when reading stdin in another thread
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 9 11:26:58 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17797
Martin Nowak <code at dawg.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |code at dawg.eu
Hardware|All |x86
--- Comment #3 from Martin Nowak <code at dawg.eu> ---
cat > bug.d << CODE
import std.stdio, core.thread;
void main()
{
auto thread = new Thread(&func).start;
writeln("Output");
writeln("Output2");
writeln("Output3");
thread.join();
}
void func()
{
foreach (line; stdin.byLineCopy)
{
}
}
CODE
dmd -run bug.d
----
Slightly nicer version that terminates on EOF (Ctrl+D), works as expected on
linux.
Sure about 2.073.2? The only interesting change in
https://github.com/dlang/dmd/compare/v2.073.1...v2.073.2
https://github.com/dlang/druntime/compare/v2.073.1...v2.073.2
https://github.com/dlang/phobos/compare/v2.073.1...v2.073.2
is https://github.com/dlang/dmd/pull/6582.
--
More information about the Digitalmars-d-bugs
mailing list