std.parallelism example hangs compiler 2.067.1
This appears to hang up dmd compiler 2.067.1. Changing parallel(s) to s works ok. Is this a known problem? import std.stdio; import std.string; import std.format; import std.range; import std.parallelism; int main(string[] argv) { string s[10]; foreach (i, ref si ; parallel(s)){ si = format(hi:%d,i); } foreach (ref rm; s[99000..99010]){ writeln(rm); } return 0; }
Re: std.parallelism example hangs compiler 2.067.1
On 8/7/15 2:37 PM, Steven Schveighoffer wrote: I'll file a bug on this. https://issues.dlang.org/show_bug.cgi?id=14886 -Steve
Re: std.parallelism example hangs compiler 2.067.1
On 8/7/15 2:19 PM, Jay Norwood wrote: This appears to hang up dmd compiler 2.067.1. Changing parallel(s) to s works ok. Is this a known problem? import std.stdio; import std.string; import std.format; import std.range; import std.parallelism; int main(string[] argv) { string s[10]; foreach (i, ref si ; parallel(s)){ si = format(hi:%d,i); } foreach (ref rm; s[99000..99010]){ writeln(rm); } return 0; } When you said hang up, I didn't understand what you meant. Now I see, it actually hangs dmd (actually, it's not hung, it is still running as far as I can tell). If I reduce to 1, it completes the compile with an error. I think it has to do with parallel(s). In fact, this code also hangs: int main(string[] argv) { string s[10]; parallel(s); } In order to get what you really do want (no hangs, no errors), use this: parallel(s[]) I'll file a bug on this. -Steve
Re: std.parallelism example hangs compiler 2.067.1
On Friday, 7 August 2015 at 18:51:45 UTC, Steven Schveighoffer wrote: On 8/7/15 2:37 PM, Steven Schveighoffer wrote: I'll file a bug on this. https://issues.dlang.org/show_bug.cgi?id=14886 -Steve Thanks. The workaround works ok.