is there any trait to check if variable is __gshared?
ketmar
nobodyherethismailsucks at gmail.com
Wed Mar 26 08:52:29 PDT 2014
> But why do you need to avoid the thread-local ones while
> crating your wrappers?
'cause i need only 'old-style' globals in my console. there is no
guarantee from which thread console command will be executed, and
i don't really need TLS vars in it. that is the 'tech
requirement'.
> (If your need is real, you can ask for the trait in the main D
> newsgroup).
alas, i can't really explain why this is necessary for everyone
(to be included in language). except that if we have such
powerfull metaprogramming abilities we should be able to access
any piece of 'type definition' (ok, technically __gshared is an
attribute, i think) info that compiler knows.
i think that '__gshared' should be part of type info, just like
'shared' is. variable can't be both 'shared' and '__gshared'
anyway.
i'll think about asking that though.
More information about the Digitalmars-d-learn
mailing list