parallel foreach hangs

kiran kumari via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 24 00:09:47 PDT 2014


On Monday, 22 September 2014 at 11:25:53 UTC, Daniel Kozak wrote:
> this code never end
>
> import std.stdio;
> import std.file;
> import std.parallelism : parallel;
> import std.algorithm : filter;
>
> void main(string[] args)
> {
>     foreach(d; parallel(args[1 .. $], 1))
>     {
>         auto phpFiles = 
> filter!`endsWith(a.name,".php")`(dirEntries(d,SpanMode.depth));
>         writeln(phpFiles);
>     }
> }

see more example
http://techgurulab.com/course/java-quiz-online/


More information about the Digitalmars-d-learn mailing list