Range and poolTask

moechofe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 6 02:32:30 PDT 2016


I wonder if it is possible to write something like this:
---
// taskPool.distribute -- take a range and distribute entries to 
different threads.
dirEntries().distribute(function(R1,R2)(R1 from,R2 to){
	from
	.filter!xxx
	.map!yyy
	.tee!zzz(to);
})
.each!www;
---
This would be great.


More information about the Digitalmars-d-learn mailing list