|
Boost-Commit : |
From: bdawes_at_[hidden]
Date: 2008-04-27 20:26:47
Author: bemandawes
Date: 2008-04-27 20:26:46 EDT (Sun, 27 Apr 2008)
New Revision: 44829
URL: http://svn.boost.org/trac/boost/changeset/44829
Log:
Move "non-const" in to places so that it applied to the objects pointed to or referenced, no to the arguments themselves. Removed editorial note, since this change should fix the problem the note described.
Text files modified:
sandbox/committee/LWG/thread_safety.html | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
Modified: sandbox/committee/LWG/thread_safety.html
==============================================================================
--- sandbox/committee/LWG/thread_safety.html (original)
+++ sandbox/committee/LWG/thread_safety.html 2008-04-27 20:26:46 EDT (Sun, 27 Apr 2008)
@@ -118,10 +118,10 @@
functions shall be <i>reentrant subroutines</i>.</font></u></p>
<p>Unless otherwise specified, calls to C++ Standard library functions from
different threads shall not result in a data race unless<font color="#228822">
- <u>non-const</u>
</font>arguments to the calls,
including <code>*this</code>, directly or indirectly <font color="#FF0000">
- <strike>access</strike></font> <u><font color="#228822">point to or reference</font></u> objects shared
+ <strike>access</strike></font> <u><font color="#228822">point to or reference</font></u><font color="#228822">
+ <u>non-const</u></font> objects shared
between the threads in such a way that an expression evaluation conflict
occurs ([intro.multithread]) .</p>
<p><i>[Note:</i> This means, for example, that
@@ -146,10 +146,10 @@
not happen before the other ([Multi-threaded executions and data races]).</strike></font></p>
<p><font color="#228822"><u>Unless otherwise specified, calls to standard
library functions from different threads result in undefined behavior if any
- non-const arguments, including *this, directly or indirectly point to or
- reference objects of a standard library type shared between the threads, and
+ arguments, including *this, directly or indirectly point to or reference
+ non-const objects of a standard library type shared between the threads, and
one call does not happen before the other ([Multi-threaded executions and data
- races]).</u></font><b><span style="background-color: #FFFF00">[Editorial note: Technically, there are no non-const arguments.]</span></b></p>
+ races]).</u></font></p>
<p><i>[Note: </i>This <font color="#FF0000"><strike>lack of strong thread-safety guarantee</strike></font>
<u><font color="#228822">prohibition against concurrent non-const access</font></u> means that
modifying an object of a standard library type shared between threads
@@ -215,7 +215,6 @@
lower_bound</code>, <code>upper_bound</code>, <code>equal_range</code>, and,
except in associative containers, <code>operator[]</code>.</font></u></p>
</blockquote>
- <p><i><span style="background-color: #FFFF00">Somewhere</span>, add:</i></p>
<blockquote>
<p><font color="#228822">Notwithstanding ([res.on.thread.safety[), implementations are required to
avoid data races when the contents of the contained object in different elements in the same sequence are modified
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk