This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Destructor support for C++11 thread_local variables
- From: Richard Henderson <rth at twiddle dot net>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org, Jakub Jelinek <jakub at redhat dot com>,Jason Merrill <jason at redhat dot com>
- Date: Wed, 10 Oct 2012 16:31:40 -0700
- Subject: Re: [PATCH] Destructor support for C++11 thread_local variables
- References: <20121010210546.7322c6fa@spoyarek> <20121010232019.15DE22C053@topped-with-meat.com>
On 10/10/2012 04:20 PM, Roland McGrath wrote:
> What is supposed to happen when you dlopen an
> object defining thread_local variables with constructors when there
> are already multiple threads?
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.
r~