$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r56385 - in branches/release: boost/multi_index/detail libs/multi_index/doc
From: joaquin_at_[hidden]
Date: 2009-09-26 08:54:44
Author: joaquin
Date: 2009-09-26 08:54:43 EDT (Sat, 26 Sep 2009)
New Revision: 56385
URL: http://svn.boost.org/trac/boost/changeset/56385
Log:
merged [56354] from trunk
Text files modified: 
   branches/release/boost/multi_index/detail/safe_mode.hpp  |    24 +++++++++++++++---------                
   branches/release/libs/multi_index/doc/release_notes.html |     6 +++++-                                  
   2 files changed, 20 insertions(+), 10 deletions(-)
Modified: branches/release/boost/multi_index/detail/safe_mode.hpp
==============================================================================
--- branches/release/boost/multi_index/detail/safe_mode.hpp	(original)
+++ branches/release/boost/multi_index/detail/safe_mode.hpp	2009-09-26 08:54:43 EDT (Sat, 26 Sep 2009)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2008 Joaquin M Lopez Munoz.
+/* Copyright 2003-2009 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -237,15 +237,21 @@
 inline void detach_equivalent_iterators(Iterator& it)
 {
   if(it.valid()){
-    Iterator *prev_,*next_;
-    for(
-      prev_=static_cast<Iterator*>(&it.cont->header);
-      (next_=static_cast<Iterator*>(prev_->next))!=0;){
-      if(next_!=&it&&*next_==it){
-        prev_->next=next_->next;
-        next_->cont=0;
+    {
+#if defined(BOOST_HAS_THREADS)
+      boost::detail::lightweight_mutex::scoped_lock lock(it.cont->mutex);
+#endif
+
+      Iterator *prev_,*next_;
+      for(
+        prev_=static_cast<Iterator*>(&it.cont->header);
+        (next_=static_cast<Iterator*>(prev_->next))!=0;){
+        if(next_!=&it&&*next_==it){
+          prev_->next=next_->next;
+          next_->cont=0;
+        }
+        else prev_=next_;
       }
-      else prev_=next_;
     }
     it.detach();
   }
Modified: branches/release/libs/multi_index/doc/release_notes.html
==============================================================================
--- branches/release/libs/multi_index/doc/release_notes.html	(original)
+++ branches/release/libs/multi_index/doc/release_notes.html	2009-09-26 08:54:43 EDT (Sat, 26 Sep 2009)
@@ -52,6 +52,10 @@
   <a href="../../serialization/doc/tutorial.html#versioning">class version</a> has been
   bumped from 0 to 1.
   </li>
+  <li>Fixed a concurrency bug in the implementation of
+    safe mode
+    (ticket #3462).
+  </li>
 </ul>
 </p>
 
@@ -278,7 +282,7 @@
 
 <br>
 
-<p>Revised September 3rd 2009</p>
+<p>Revised September 22nd 2009</p>
 
 <p>© Copyright 2003-2009 Joaquín M López Muñoz.
 Distributed under the Boost Software