libstdc was not safe in 2.92, is it now in 3.X?
Andrew B. Lundgren
Andrew.Lundgren@Level3.com
Tue Aug 28 15:28:00 GMT 2001
On 28 Aug 2001 jason_merrill@redhat.com wrote:
> >>>>> "Andrew" == Andrew B Lundgren <Andrew.Lundgren@Level3.com> writes:
>
> > The FAQ points the the 11th release as the current release (or 2.92) and
> > says it is not thread safe based on the following definition:
>
> > The SGI implementation of STL is thread-safe only in the sense that
> > simultaneous accesses to distinct containers are safe, and simultaneous
> > read accesses to to shared containers are safe. If multiple threads
> > access a single container, and at least one thread may potentially write,
> > then the user is responsible for ensuring mutual exclusion between the
> > threads during the container accesses.
>
> Yes. This is by design.
>
> > Is the rest of the library thread safe now in 3.X or does the current FAQ
> > hold that it "is not appropriate for multithreaded access"? (Based on
> > the SGI definition)
>
> It is appropriate for multithreaded access, but you must control access to
> the containers yourself, just as with any other shared resource. Having
> the container class do it internally is too slow.
>
Agreed completely.
So it is now thread safe according to the SGI definition where as it was not before correct?
At what version did it become thread safe according to the SGI definition?
--
Andrew Lundgren
Andrew.Lundgren@level3.com
More information about the Libstdc++
mailing list