problem with parallel foreach

thedeemon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 13 01:08:55 PDT 2015


On Wednesday, 13 May 2015 at 06:59:02 UTC, Ali Çehreli wrote:
> > In case of Python's parallel.Pool() separate processes do the
> > work without any synchronization issues. In case of D's
> > std.parallelism it's just threads inside one process and they
> > do fight for some locks, thus this result.
>
> Right. To do the same in D, one must use fibers.

No, to do the same one must use separate OS processes. Fibers 
won't help you against parallel threads fighting for GC & IO 
locks.


More information about the Digitalmars-d-learn mailing list