Ruby-style "each" in D?

Vladimir Panteleev vladimir at thecybershadow.net
Sun Mar 23 10:23:05 PDT 2014


On Thursday, 20 March 2014 at 15:25:47 UTC, Andrea Fontana wrote:
> Why isn't ParallelForEach implemented as Range, instead?

Because it can't be. It's not possible to present something as a 
range, so that that range's consumers would process that range in 
parallel. std.parallelism.parallel instead (ab)uses the opApply 
implementation mechanics to execute the foreach body in different 
threads.


More information about the Digitalmars-d mailing list