[Bug libstdc++/50834] New: Documentation about STL thread safety is ambiguous

bergerp at laposte dot net gcc-bugzilla@gcc.gnu.org
Sat Oct 22 22:15:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50834

             Bug #: 50834
           Summary: Documentation about STL thread safety is ambiguous
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bergerp@laposte.net


The libstdc++ documentation at
http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_concurrency.html states :

"We currently use the SGI STL definition of thread safety."


Then, a few paragraphs later, it also reads :

"All library objects are safe to use in a multithreaded program as long as each
thread carefully locks out access by any other thread while it uses any object
visible to another thread, i.e., treat library objects like any other shared
resource. In general, this requirement includes both read and write access to
objects"


This seems to be contradictory with the SGI STL thread safety definition, which
states that :

"simultaneous read accesses to shared containers are safe"


Regards,
Pierre



More information about the Gcc-bugs mailing list