Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59841 - sandbox/stm/branches/vbe/boost/stm/detail
From: vicente.botet_at_[hidden]
Date: 2010-02-22 05:52:18


Author: viboes
Date: 2010-02-22 05:52:18 EST (Mon, 22 Feb 2010)
New Revision: 59841
URL: http://svn.boost.org/trac/boost/changeset/59841

Log:
Boost.STM/vbe:
* BUG: On transaction destruction the transaction is not removed from the transactionsInFlight_ when state_ == e_in_flight, i.e. when a exception is thrown. Take care of the solution proposed by Justin.

Text files modified:
   sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp | 11 +++++++++--
   1 files changed, 9 insertions(+), 2 deletions(-)

Modified: sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp 2010-02-22 05:52:18 EST (Mon, 22 Feb 2010)
@@ -687,9 +687,16 @@
        synchro::lock_guard<Mutex> lock(*mutex());
         abort();
     }
- transactionsInFlight_.erase(this);
     transactions().pop();
 
+ // BUG not removed from the list because the test is inversed
+ //~ if (alreadyRemovedFromInFlight)
+
+ //~ synchro::lock(*inflight_lock());
+ // if I'm the last transaction of this thread, reset abort to false
+ //~ transactionsInFlight_.erase(this);
+
+
 }
 
 //--------------------------------------------------------------------------
@@ -1308,7 +1315,7 @@
    wbloom().clear();
 #endif
 
- if (alreadyRemovedFromInFlight)
+ if (!alreadyRemovedFromInFlight)
    {
       synchro::lock(*inflight_lock());
       // if I'm the last transaction of this thread, reset abort to false


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