Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62186 - sandbox/stm/boost/stm
From: justin_at_[hidden]
Date: 2010-05-25 00:05:15


Author: jgottschlich
Date: 2010-05-25 00:05:15 EDT (Tue, 25 May 2010)
New Revision: 62186
URL: http://svn.boost.org/trac/boost/changeset/62186

Log:
fixed is_only_reading and associated functions.
Text files modified:
   sandbox/stm/boost/stm/transaction.hpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: sandbox/stm/boost/stm/transaction.hpp
==============================================================================
--- sandbox/stm/boost/stm/transaction.hpp (original)
+++ sandbox/stm/boost/stm/transaction.hpp 2010-05-25 00:05:15 EDT (Tue, 25 May 2010)
@@ -1,3 +1,4 @@
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // (C) Copyright Justin E. Gottchlich 2009.
@@ -1228,8 +1229,10 @@
 #ifndef DISABLE_READ_SETS
    inline bool isReading() const { return !readListRef_.empty(); }
 #endif
- inline bool isWriting() const { return !write_list()->empty(); }
- inline bool is_only_reading() const { return !isWriting(); }
+ inline bool isWriting()
+ { return ! (write_list()->empty() && deletedMemoryList().empty() && newMemoryList().empty()) ; }
+
+ inline bool is_only_reading() { return !isWriting(); }
 
    // undefined and hidden - never allow these - bad things would happen
    transaction& operator=(transaction const &);


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