Concurrency.

Timon Gehr timon.gehr at gmx.ch
Mon Nov 28 11:16:34 PST 2011


On 11/28/2011 07:41 PM, Debdatta wrote:
>>> 1. Your variables are thread local. This guarantees some nice
>>> properties, like code that was intended to run in a single-threaded
>>> environment when it was written will behave nicely in a multi-threaded
>>> environment too, because every thread gets a copy of all global data.
>>> This is a sane default.
>
> Now I understand your reasoning a lot better. :D this is one case where D's defaults will come very handy. Its very different from what I have seen
> so far, so maybe its a culture shock.

Probably that is the case. =)

>
>>> There is one to one feature correspondence.
>
> Of course. That is obvious.:D It just seemed counter intuitive to have every variable I declare to be thread local. Will experiment with it some
> more and see if I can get used to the concept. You seem to have very good reasons to prefer it, and I hope I can see them too. :D
>
> -Debdatta



More information about the Digitalmars-d mailing list