[PATCH] Destructor support for C++11 thread_local variables
Roland McGrath
roland@hack.frob.com
Thu Oct 11 22:17:00 GMT 2012
> On 10/10/2012 05:09 PM, Roland McGrath wrote:
> >> Loosely, construct on first use.
> >>
> >> IOW we need not run constructors on tls variables for a thread until a
> >> function that touches those tls variables runs on that thread.
> >
> > That's a straightforward specification that's perfectly clear to me.
> > So what's "loose"?
>
> One must construct all of the tls variables from a translation unit at
> the same time.
Is that a semantic requirement? Is there a special technical reason for
it, or just "principle of least astonishment" for people who write
constructors with side effects?
Thanks,
Roland
More information about the Libc-alpha
mailing list