shared - no read/write access

Kagamin spam at here.lot
Wed Mar 27 18:25:09 UTC 2019


On Tuesday, 26 March 2019 at 21:09:18 UTC, Rubn wrote:
> __gshared int a;
>
> See above, you have an unqualified type. Would you say it is 
> thread local? Is there any way you can see that it is thread 
> local by the type alone?

It has thread local type. It's an escape provided to ease 
migration from other languages, when it's difficult for whatever 
reason to have shared data qualified as shared.

>> Its meaning is to provide guarantee that thread-local data 
>> doesn't have threading issues and I posted the proof of its 
>> usefulness.
>
> Why do you think "shared" means thread-local data? And then you 
> go on to say that it is unqualified types?

shared is a qualifier for data that is not thread local, so that 
thread local data remains unqualified to reduce churn for it.


More information about the Digitalmars-d mailing list