Debug help - ! in data sharing concurrency
Andy Valencia
dont at spam.me
Sun Aug 31 13:40:32 UTC 2025
On Sunday, 31 August 2025 at 12:44:33 UTC, Brother Bill wrote:
> FWIW, given that D supports Message Passing Concurrency, is
> Data Sharing Concurrency just there for D completeness, for
> those that want to live close to the iron.
Speaking as a guy who did Unix kernel SMP for years, there are
times when you just need shared memory, spinlocks, atomic
lock->semaphore transitions, atomic operations (increment,
compare/exchange, etc.). D has all of'em, and I made sure they
worked when I was first looking at D.
> It would seem that Message Passing Concurrency should be our
> first, second and third choice for concurrency.
Indeed. As the Golang folks have also noted, message passing is
almost inevitably a more productive and less error prone way to
coordinate parallel threads. If, some day, you find your
parallel app dying under the overhead of all the messaging--you
can keep shared memory programming in mind as a possible
alternative.
Andy
More information about the Digitalmars-d-learn
mailing list