This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: Correct misinformation
- To: libstdc++ at gcc dot gnu dot org
- Subject: PATCH: Correct misinformation
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Fri, 12 Oct 2001 19:07:08 -0500 (CDT)
- Reply-to: rittle at labs dot mot dot com
Sorry about the misinformation. Without closely checking, I was lead
to believe that string offered the stronger claim than other parts.
Committed to mainline.
2001-10-12 Loren J. Rittle <ljrittle@acm.org>
* docs/html/faq/index.html (Is libstdc++-v3 thread-safe?): Update
based on Nathan's review. Use Nathan's words.
Index: docs/html/faq/index.html
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/docs/html/faq/index.html,v
retrieving revision 1.20
diff -c -r1.20 index.html
*** index.html 2001/10/11 06:07:50 1.20
--- index.html 2001/10/12 23:49:50
***************
*** 686,692 ****
<hr>
<h2><a name="5_6">5.6 Is libstdc++-v3 thread-safe?</a></h2>
! <p>When the system's libc is itself thread-safe, libstdc++-v3
strives to be thread-safe. The user-code must guard against
concurrent method calls which may access any particular
library object's state. Typically, the application
--- 686,694 ----
<hr>
<h2><a name="5_6">5.6 Is libstdc++-v3 thread-safe?</a></h2>
! <p>When the system's libc is itself thread-safe, a non-generic
! implementation of atomicity.h exists for the architecture, and
! gcc itself reports a thread model other than single; libstdc++-v3
strives to be thread-safe. The user-code must guard against
concurrent method calls which may access any particular
library object's state. Typically, the application
***************
*** 718,739 ****
object_a.mutate ();
}
</pre>
! <p>However, as of gcc 3.0 and point releases, beware that there
! may be cases where shared nested or global objects (neither
! of which are visible to user-code) are affected or used
! without any internal locking.
! <!-- Is this warning still required? - Loren -->
! </p>
! <p>In some cases, a stronger thread-safe claim is made. The
! string class is thread-safe without user-code guards (i.e. a
! string object may be shared and accessed between threads
! without user-level locking). The IO classes are thread-safe
! with user-code guards whenever the same user-visible object
! may be accessed by multiple threads. The container classes
! are thread-safe with user-code guards whenever the same
! container may be accessed by multiple threads. All accesses
! to hidden shared objects (e.g. the global allocator objects)
! are believed to be properly guarded within the library.
</p>
<p>See chapters <a href="../17_intro/howto.html#3">17</a>,
<a href="../23_containers/howto.html#3">23</a> and
--- 720,731 ----
object_a.mutate ();
}
</pre>
! <p>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. This requirement includes both read and write access
! to objects; do not assume that two threads may read a shared
! standard container at the same time.
</p>
<p>See chapters <a href="../17_intro/howto.html#3">17</a>,
<a href="../23_containers/howto.html#3">23</a> and