Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60910 - sandbox/transaction/boost/transact
From: strasser_at_[hidden]
Date: 2010-03-29 08:38:10


Author: stefans
Date: 2010-03-29 08:38:09 EDT (Mon, 29 Mar 2010)
New Revision: 60910
URL: http://svn.boost.org/trac/boost/changeset/60910

Log:
only initialize a transaction mutex if there are lazy resources
Text files modified:
   sandbox/transaction/boost/transact/basic_transaction_manager.hpp | 32 ++++++++++----------------------
   1 files changed, 10 insertions(+), 22 deletions(-)

Modified: sandbox/transaction/boost/transact/basic_transaction_manager.hpp
==============================================================================
--- sandbox/transaction/boost/transact/basic_transaction_manager.hpp (original)
+++ sandbox/transaction/boost/transact/basic_transaction_manager.hpp 2010-03-29 08:38:09 EDT (Mon, 29 Mar 2010)
@@ -8,42 +8,30 @@
 #define BOOST_TRANSACT_BASIC_TRANSACTION_MANAGER_HEADER_HPP
 
 #include <boost/thread/locks.hpp>
-#include <boost/thread/tss.hpp>
-#include <boost/transact/detail/mutex.hpp>
-#include <boost/transact/exception.hpp>
-#include <boost/transact/detail/static_tss.hpp>
-#include <boost/transact/resource_manager.hpp>
-#include <boost/type_traits/add_pointer.hpp>
-#include <boost/fusion/include/mpl.hpp>
-#include <boost/fusion/include/as_vector.hpp>
-#include <boost/fusion/include/count_if.hpp>
-#include <boost/fusion/include/at.hpp>
-#include <boost/fusion/include/vector.hpp>
 #include <boost/utility/in_place_factory.hpp>
 #include <boost/static_assert.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/optional/optional.hpp>
 #include <boost/mpl/transform.hpp>
-#include <boost/mpl/size.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/at.hpp>
 #include <boost/mpl/map.hpp>
-#include <boost/mpl/range_c.hpp>
 #include <boost/mpl/for_each.hpp>
-#include <boost/mpl/if.hpp>
 #include <boost/mpl/empty_sequence.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/deref.hpp>
-#include <boost/mpl/find.hpp>
 #include <boost/mpl/find_if.hpp>
 #include <boost/mpl/contains.hpp>
-#include <boost/mpl/distance.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/optional/optional.hpp>
+#include <boost/mpl/insert.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/fusion/include/mpl.hpp>
+#include <boost/fusion/include/at.hpp>
 #include <boost/fusion/include/pair.hpp>
 #include <boost/fusion/include/as_map.hpp>
 #include <boost/fusion/include/at_key.hpp>
-#include <boost/mpl/map.hpp>
-#include <boost/mpl/insert.hpp>
+#include <boost/transact/detail/mutex.hpp>
+#include <boost/transact/exception.hpp>
+#include <boost/transact/detail/static_tss.hpp>
+#include <boost/transact/resource_manager.hpp>
 
 
 namespace boost{
@@ -182,7 +170,7 @@
         transaction * const parent;
 
         typedef typename mpl::if_c<
- TThreads,
+ TThreads && !mpl::empty<Lazy>::value,
             transact::detail::mutex_type,
             transact::detail::null_lockable
>::type mutex_type;


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