Boost logo

Boost-Commit :

From: dwalker07_at_[hidden]
Date: 2008-08-27 16:13:15


Author: dlwalker
Date: 2008-08-27 16:13:15 EDT (Wed, 27 Aug 2008)
New Revision: 48407
URL: http://svn.boost.org/trac/boost/changeset/48407

Log:
Added notes on thread safety
Text files modified:
   sandbox/hat/boost/containers/hat.hpp | 11 +++++++++++
   1 files changed, 11 insertions(+), 0 deletions(-)

Modified: sandbox/hat/boost/containers/hat.hpp
==============================================================================
--- sandbox/hat/boost/containers/hat.hpp (original)
+++ sandbox/hat/boost/containers/hat.hpp 2008-08-27 16:13:15 EDT (Wed, 27 Aug 2008)
@@ -344,6 +344,11 @@
 
         \return An index to an element in \c #c, or zero if
                  <code>this-&gt;c.empty()</code>.
+
+ \note Since this member function may mutate a member object, it is
+ \e not thread-safe even among multiple readers. This applies to
+ all other \c const member functions that call this one (i.e.
+ \c #pick and \c #top).
      */
     size_type choice() const
     {
@@ -472,6 +477,9 @@
 
         \post The R.N.G. engine may change, even with \c const.
 
+ \warning Since this member function may mutate a member object, it is
+ \e not thread-safe even among multiple readers.
+
         \see #choice
         \see #boost::containers::hat::const_token
      */
@@ -514,6 +522,9 @@
 
         \post The R.N.G. engine may change, even with \c const.
 
+ \warning Since this member function may mutate a member object, it is
+ \e not thread-safe even among multiple readers.
+
         \see #choice
      */
     const_reference top() const { return *this->pick(); }


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