[Issue 13752] New: add traits to query storage class of variables (isTLS, isGlobal)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 19 05:40:05 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13752

          Issue ID: 13752
           Summary: add traits to query storage class of variables (isTLS,
                    isGlobal)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

Knowing whether a variable is thread-local (TLS) sometimes allows to leave-out
otherwise necessary synchronization.
Currently it's extremely hacky to infer this, so a isTLS trait would be
helpful.
It might also make sense to add the complements isGlobal and isLocal.

http://dpaste.dzfl.pl/ed0b271d434b

--


More information about the Digitalmars-d-bugs mailing list