terminate handler global or per thread?
Ian Lance Taylor
iant@google.com
Sun Aug 23 17:01:00 GMT 2009
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
More information about the Libstdc++
mailing list