diff options
author | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-13 00:06:21 +0000 |
---|---|---|
committer | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-13 00:06:21 +0000 |
commit | 985d3a40f56df485ed529175820b192fc4346197 (patch) | |
tree | c683a1686d25ca3bc6fc2b06e138eb19d9fb2ad8 /libstdc++-v3 | |
parent | 6c9278b0c46d24d52c55bb2e1edd4a437f059ce7 (diff) | |
download | gcc-985d3a40f56df485ed529175820b192fc4346197.tar.gz |
* docs/html/faq/index.html (Is libstdc++-v3 thread-safe?): Update
based on Nathan's review. Use Nathan's words.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/faq/index.html | 26 |
2 files changed, 14 insertions, 17 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cde49f144f0..808d1f07420 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +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. + 2001-10-11 Matt Kraai <kraai@alumni.carnegiemellon.edu> * docs/html/configopts.html: Quote StyleSheet attribute values. diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html index 4d8510a1031..e0f31ceba3e 100644 --- a/libstdc++-v3/docs/html/faq/index.html +++ b/libstdc++-v3/docs/html/faq/index.html @@ -686,7 +686,9 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff <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 + <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,22 +720,12 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff 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>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 |