This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: refcounting basic_string<> and thread safety
- To: libstdc++@sourceware.cygnus.com
- Subject: Re: refcounting basic_string<> and thread safety
- From: Nathan Myers <ncm@best.com>
- Date: Tue, 22 Jun 1999 23:39:28 -0700 (PDT)
> > I'm guessing that the current refcounting <string> with gcc/egcs
> > library isn't thread safe?
>
> Perhaps.
>
> It's certainly the intention of v-3's string class: Nathan should be
> able to provide the definitive answer.
The current implementation certainly isn't thread-safe.
However, most of the places that would need to change are marked
"XXX MT". It mostly depends on having good underlying atomic
primitives: increment, and decrement-and-test.
Nathan Myers
ncm@cantrip.org