problem with parallel foreach
Gerald Jansen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 13 02:01:04 PDT 2015
On Wednesday, 13 May 2015 at 03:19:17 UTC, thedeemon 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.
Okay, so to do something equivalent I would need to use
std.process. My next question is how to pass the common data to
the sub-processes. In the Python approach I guess this is
automatically looked after by pickling serialization. Is there
something similar in D? Alternatively, would the use of
std.mmfile to temporarily store the common data be a reasonable
approach?
More information about the Digitalmars-d-learn
mailing list