Struggling to implement parallel foreach...
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Jun 17 21:01:50 UTC 2019
On Monday, 17 June 2019 at 20:11:32 UTC, Manu wrote:
> I think I'm uniquely positioned to move the bar
> forward here and make something that's actually useful, and
> demonstrated what shared is actually for.
> Reality is, most people don't write highly multi-threaded code,
> maybe
> they spin a worker thread or something, but that's not what the
> future
> looks like.
Yes, I don't think many people write highly multi-threaded code.
I think the model that is easiest to understand is that you have
a queue of work to be done and then just let worker threads grab
work from that queue. More complicated structures require a lot
of planning and it is difficult to be 100% certain that you never
can get a deadlock as the program design evolves over time.
I think it is difficult to say what they future looks like, it
involves many cores, I think, but perhaps also more local memory
per core. So… maybe the actor model will take off at some point,
but I don't know. I think the actor model is easier to grasp, so
it might win out even if it adds overhead.
Right now there seems to be many different hardware mechanisms
that provide parallel computation that are rather specialized.
SIMD, FPGA, GPU, neural network oriented cores, etc.
More information about the Digitalmars-d
mailing list