This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] 12658_thread.cc randomly fails (on MP machines)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Nathan Myers <ncm-nospam at cantrip dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 06 Jul 2004 12:50:12 +0200
- Subject: Re: [RFC] 12658_thread.cc randomly fails (on MP machines)
- References: <40E9717C.30003@suse.de> <20040706043021.GB10205@tofu.dreamhost.com>
Nathan Myers wrote:
I just looked at the PR for the first time. What a load of nonsense!
There's no need for mutexes anywhere.
It would suffice to add calls to add_reference and remove_reference
to keep anything from disappearing too early.
Hi Nathan. Indeed, I had hopes but haven't been able to figure out
something really working in every circumstance.
Consider the simplest case
locale::locale() throw() : _M_impl(0)
{
_S_initialize();
__gnu_cxx::lock sentry(__gnu_internal::locale_cons_mutex);
_S_global->_M_add_reference();
_M_impl = _S_global;
}
together with the original report ( 2) ) + Comment #14: how can you
possibly deal with those patterns??
Thanks,
Paolo.