Threads and static initialization.

Jonathan M Davis jmdavisProg at gmx.com
Fri Dec 17 15:27:01 PST 2010


On Friday 17 December 2010 15:17:14 Vladimir Panteleev wrote:
> On Sat, 18 Dec 2010 00:33:43 +0200, Jonathan M Davis <jmdavisProg at gmx.com>
> 
> wrote:
> > That seems like it would be _really_ hard to do - probably impossible.
> 
> This is about TLS, right?
> 
> If so, can't we just add a way to create a thread without TLS, so that any
> attempts to access it will cause an access violation? Sounds simple and
> useful enough.

Except that virtually _everything_ in D is in TLS. Only shared variables and 
some immutable variables aren't. So, unless you use a set of functions which 
uses shared variables for _everything_, that would be rather useless.

- Jonathan M Davis


More information about the Digitalmars-d mailing list