Yet another parallel foreach + continue question

seany seany at uni-bonn.de
Tue Jul 20 03:24:26 UTC 2021


On Tuesday, 20 July 2021 at 02:58:50 UTC, H. S. Teoh wrote:
> On Tue, Jul 20, 2021 at 02:39:58AM +0000, seany via 
> Digitalmars-d-learn wrote:
>> > [...]
> [...]
>> [...]
>
> Logically speaking, the size of the work unit should not change 
> the semantics of the loop. That's just an implementation detail 
> that should not affect the semantics of the overall 
> computation.  In order to maintain consistency, loop iterations 
> should not affect each other (unless they deliberately do so, 
> e.g., read/write from a shared variable -- but parallel foreach 
> itself should not introduce such a dependency).
>
> [...]

Okey, thank you.

If you later have some time, and find out about the exact 
implementation - and help me to understand it -  I would be most 
grateful.

I have checked: [this 
link](https://github.com/dlang/phobos/blob/master/std/parallelism.d) - but did not understand completely.


More information about the Digitalmars-d-learn mailing list