This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: terminate handler global or per thread?


Mike Harrold <harrold.family@gmail.com> writes:

> On Fri, Aug 21, 2009 at 5:29 PM, Ian Lance Taylor <iant@google.com> wrote:
>
>> Brendan Miller <catphive@catphive.net> writes:
>>
>> > Is the terminate handler normal static data or is it thread local? I'm
>> > using GCC 3.4 and also 4.3.
>>
>> The terminate handler is a normal global variable.  It is not thread
>> local.
>>
>> Ian
>>
>
> Doesn't this introduce all kinds of issues regarding thread safety?!?

If you want to have different terminate handlers in different threads,
then, yes, it certainly does.  But that seems like a fairly unusual use
case to me.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]