Does D have equivalent of Java util.concurrent?

Dibyendu Majumdar d.majumdar at gmail.com
Sun Apr 28 08:34:43 UTC 2019


On Sunday, 28 April 2019 at 03:54:43 UTC, rikki cattermole wrote:
> On 28/04/2019 12:13 PM, Dibyendu Majumdar wrote:
>> On Saturday, 27 April 2019 at 18:26:53 UTC, Andre Pany wrote:
>>> Concurrent features included in Phobos are nicely written 
>>> down here
>>>
>>> http://ddili.org/ders/d.en/concurrency.html
>>> http://ddili.org/ders/d.en/parallelism.html
>>> http://ddili.org/ders/d.en/concurrency_shared.html

>> I need to understand the model used by D. As a systems 
>> language it should not be imposing a programming model but it 
>> appears to do so here.
>
> What model are you thinking it is imposing?

I have to understand the model. Suppose some mutable data is 
passed around between threads. I don't really know as I haven't 
read this in detail - but my question is this: is there a cost to 
accessing data across threads?

As in C or C++ I would expect the cost to be zero unless marked 
volatile.

I admit I don't understand the model of memory access in D. It 
seems that like Go, D is attempting to push a message passing 
model - that's what I meant by 'imposing a model'.


More information about the Digitalmars-d mailing list