Concurrency.

Debdatta debdatta.basu91 at gmail.com
Mon Nov 28 10:41:46 PST 2011


>>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.

>>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