Concurrency architecture for D2

dsimcha dsimcha at yahoo.com
Fri Jan 8 15:12:38 PST 2010


== Quote from Walter Bright (newshound1 at digitalmars.com)'s article
> Sure. Except that implicit parallelism is inherently unsound unless the
> type system can support it.
> I'll go further than that. Any language that supports implicit sharing
> of mutable data is inherently unsound for multithreaded programming.

One thing that I think needs to be considered in the concurrency architecture is
the case of performance-critical massive data parallelism.  In these cases
concurrency is actually not very hard and a simple parallel foreach loop covers a
lot of cases.  As far as safety, the amount of code being executed inside a
parallel foreach loop is generally small enough that it's easy to reason about,
and thus it's ok not to have any hard static guarantees and leave safety up to the
programmer, as long as the programmer understands at least the basics of concurrency.

I would like to see a situation where OpenMP/ParallelFuture-style concurrency is
still implementable in D without unreasonable performance or syntactic overhead
after the new concurrency system is fully in place.



More information about the Digitalmars-d mailing list