Why is amap implemented as a member function of TaskPool?
    Atila Neves via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Sep 18 12:48:59 PDT 2014
    
    
  
Or what I really want to ask: why can't I call amap from 
std.parallelism with a lambda? I assume it's because it's a 
member function but I'm not 100% sure.
I hardly ever call map with a named function (named local 
functions don't work with TaskPool.amap either), it's always a 
closure. Not just in D, pretty much in any language I write code 
in.
I had to roll my own parallel map today, but at least I did get a 
nice 3x speedup.
Atila
    
    
More information about the Digitalmars-d-learn
mailing list