foreach (i; taskPool.parallel(0..2_000_000)

Ali Çehreli acehreli at yahoo.com
Tue Apr 4 13:18:01 UTC 2023


On 4/4/23 02:24, Salih Dincer wrote:

 > I don't understand what `foreach()` does :)

Hm. I forgot whether 'parallel' works only with 'foreach'. But there are 
various other algorithms in std.parallelism that may be more useful with 
range algorithm chains:

   https://dlang.org/phobos/std_parallelism.html

 > in Turkish

I don't have time to experiment more at this time but I have the 
following chapters, which includes some of those other algorithms as well:

   http://ddili.org/ders/d/kosut_islemler.html

   http://ddili.org/ders/d.en/parallelism.html

Ali



More information about the Digitalmars-d-learn mailing list