Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52611 - in sandbox/task: boost/task boost/task/detail libs/task/src
From: oliver.kowalke_at_[hidden]
Date: 2009-04-26 14:41:29


Author: olli
Date: 2009-04-26 14:41:28 EDT (Sun, 26 Apr 2009)
New Revision: 52611
URL: http://svn.boost.org/trac/boost/changeset/52611

Log:
* scoped_reset moved to pool_callable

Text files modified:
   sandbox/task/boost/task/detail/pool_callable.hpp | 25 +++++++++++--------------
   sandbox/task/boost/task/detail/worker.hpp | 2 +-
   sandbox/task/boost/task/info.hpp | 30 +++++++++---------------------
   sandbox/task/libs/task/src/pool_callable.cpp | 4 ++--
   4 files changed, 23 insertions(+), 38 deletions(-)

Modified: sandbox/task/boost/task/detail/pool_callable.hpp
==============================================================================
--- sandbox/task/boost/task/detail/pool_callable.hpp (original)
+++ sandbox/task/boost/task/detail/pool_callable.hpp 2009-04-26 14:41:28 EDT (Sun, 26 Apr 2009)
@@ -21,8 +21,6 @@
 {
 namespace detail
 {
-class scoped_guard;
-
 class BOOST_TASK_DECL pool_callable
 {
 private:
@@ -63,6 +61,16 @@
         shared_ptr< impl > impl_;
 
 public:
+ class scoped_guard : public noncopyable
+ {
+ private:
+ pool_callable & ca_;
+
+ public:
+ scoped_guard( pool_callable &, shared_ptr< thread > &);
+
+ ~scoped_guard();
+ };
 
         pool_callable();
 
@@ -79,18 +87,7 @@
 
         void clear();
 };
-
-class BOOST_TASK_DECL scoped_guard : public noncopyable
-{
-private:
- pool_callable ca_;
-
-public:
- scoped_guard( pool_callable &, shared_ptr< thread > &);
-
- ~scoped_guard();
-};
-} } }
+}}}
 
 #include <boost/config/abi_suffix.hpp>
 

Modified: sandbox/task/boost/task/detail/worker.hpp
==============================================================================
--- sandbox/task/boost/task/detail/worker.hpp (original)
+++ sandbox/task/boost/task/detail/worker.hpp 2009-04-26 14:41:28 EDT (Sun, 26 Apr 2009)
@@ -102,7 +102,7 @@
                         BOOST_ASSERT( ! ca.empty() );
                         guard grd( get_pool().active_worker_);
                         {
- scoped_guard lk( ca, thrd_);
+ pool_callable::scoped_guard lk( ca, thrd_);
                                 ca();
                         }
                         ca.clear();

Modified: sandbox/task/boost/task/info.hpp
==============================================================================
--- sandbox/task/boost/task/info.hpp (original)
+++ sandbox/task/boost/task/info.hpp 2009-04-26 14:41:28 EDT (Sun, 26 Apr 2009)
@@ -4,31 +4,19 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_TASK_INFO_H
-#define BOOST_TASK_INFO_H
-
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-#include <boost/task/detail/info.hpp>
+#ifndef BOOST_TASK_DETAIL_INFO_H
+#define BOOST_TASK_DETAIL_INFO_H
 
 namespace boost { namespace task
 {
-template< typename Pool >
-struct has_priority : public mpl::bool_<
- is_same<
- detail::has_priority,
- typename Pool::scheduler_type::priority_tag_type
- >::value
- >
+namespace detail
+{
+struct has_priority
 {};
 
-template< typename Pool >
-struct priority_type
-{
- typedef typename Pool::scheduler_type::attribute_type type;
-};
-} }
+struct has_no_priority
+{};
+} } }
 
-#endif // BOOST_TASK_INFO_H
+#endif // BOOST_TASK_DETAIL_INFO_H
 

Modified: sandbox/task/libs/task/src/pool_callable.cpp
==============================================================================
--- sandbox/task/libs/task/src/pool_callable.cpp (original)
+++ sandbox/task/libs/task/src/pool_callable.cpp 2009-04-26 14:41:28 EDT (Sun, 26 Apr 2009)
@@ -26,11 +26,11 @@
 pool_callable::clear()
 { impl_.reset(); }
 
-scoped_guard::scoped_guard( pool_callable & ca, shared_ptr< thread > & thrd)
+pool_callable::scoped_guard::scoped_guard( pool_callable & ca, shared_ptr< thread > & thrd)
 : ca_( ca)
 { ca_.impl_->set( thrd); }
 
-scoped_guard::~scoped_guard()
+pool_callable::scoped_guard::~scoped_guard()
 { ca_.impl_->reset(); }
 } } }
 


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