Thread-local Member Variables?

dsimcha dsimcha at yahoo.com
Wed Jan 13 05:52:42 PST 2010


Should there be a way, in D, to create a variable that's local to both a
thread and a class instance?  For example:

class Foo {
    __thread uint num;
}

num would basically be a reference to thread-local storage, with a new one
created for every instance of Foo.  Is there a (non-hacky) way to do this already?



More information about the Digitalmars-d mailing list