|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53415 - in sandbox/task: boost/task libs/task/test
From: oliver.kowalke_at_[hidden]
Date: 2009-05-29 18:08:58
Author: olli
Date: 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
New Revision: 53415
URL: http://svn.boost.org/trac/boost/changeset/53415
Log:
* some corrections
Text files modified:
sandbox/task/boost/task/meta.hpp | 4 ++--
sandbox/task/boost/task/static_pool.hpp | 10 +++++++++-
sandbox/task/boost/task/task.hpp | 6 ++++++
sandbox/task/libs/task/test/test_bounded_pool.cpp | 14 ++++----------
sandbox/task/libs/task/test/test_own_thread.cpp | 2 +-
sandbox/task/libs/task/test/test_unbounded_pool.cpp | 14 ++++----------
6 files changed, 26 insertions(+), 24 deletions(-)
Modified: sandbox/task/boost/task/meta.hpp
==============================================================================
--- sandbox/task/boost/task/meta.hpp (original)
+++ sandbox/task/boost/task/meta.hpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -18,7 +18,7 @@
struct has_attribute : public mpl::bool_<
is_same<
detail::has_attribute,
- typename Pool::scheduler_type::attribute_tag_type
+ typename Pool::channel::scheduler_type::attribute_tag_type
>::value
>
{};
@@ -26,7 +26,7 @@
template< typename Pool >
struct attribute_type
{
- typedef typename Pool::scheduler_type::attribute_type type;
+ typedef typename Pool::channel::scheduler_type::attribute_type type;
};
} }
Modified: sandbox/task/boost/task/static_pool.hpp
==============================================================================
--- sandbox/task/boost/task/static_pool.hpp (original)
+++ sandbox/task/boost/task/static_pool.hpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -38,10 +38,18 @@
template< typename Channel >
class static_pool : private noncopyable
{
+public:
+ typedef Channel channel;
+
private:
+ template< typename Pool >
+ friend struct has_attribute;
+
+ template< typename Pool >
+ friend struct attribute_type;
+
friend class detail::worker;
- typedef Channel channel;
typedef typename channel::item channel_item;
detail::worker_group wg_;
Modified: sandbox/task/boost/task/task.hpp
==============================================================================
--- sandbox/task/boost/task/task.hpp (original)
+++ sandbox/task/boost/task/task.hpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -31,6 +31,8 @@
template< typename Channel >
class static_pool;
+struct as_sub_task;
+
template< typename R >
class task
{
@@ -38,6 +40,8 @@
template< typename Channel >
friend class static_pool;
+ friend struct as_sub_task;
+
struct impl
{
promise< R > prom;
@@ -141,6 +145,8 @@
template< typename Channel >
friend class static_pool;
+ friend struct as_sub_task;
+
struct impl
{
promise< void > prom;
Modified: sandbox/task/libs/task/test/test_bounded_pool.cpp
==============================================================================
--- sandbox/task/libs/task/test/test_bounded_pool.cpp (original)
+++ sandbox/task/libs/task/test/test_bounded_pool.cpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -312,11 +312,8 @@
tsk::bounded_channel< tsk::priority< int > >
> pool_type;
BOOST_CHECK( tsk::has_attribute< pool_type >::value);
- BOOST_CHECK(
- boost::is_same<
- tsk::attribute_type< pool_type >::type,
- int
- >::value);
+ typedef boost::is_same< tsk::attribute_type< pool_type >::type, int > type;
+ BOOST_CHECK( type::value);
pool_type pool(
tsk::poolsize( 1),
tsk::high_watermark( 10),
@@ -357,11 +354,8 @@
tsk::bounded_channel< tsk::smart< int, std::less< int >, tsk::replace_oldest, tsk::take_oldest > >
> pool_type;
BOOST_CHECK( tsk::has_attribute< pool_type >::value);
- BOOST_CHECK(
- boost::is_same<
- tsk::attribute_type< pool_type >::type,
- int
- >::value);
+ typedef boost::is_same< tsk::attribute_type< pool_type >::type, int > type;
+ BOOST_CHECK( type::value);
pool_type pool(
tsk::poolsize( 1),
tsk::high_watermark( 10),
Modified: sandbox/task/libs/task/test/test_own_thread.cpp
==============================================================================
--- sandbox/task/libs/task/test/test_own_thread.cpp (original)
+++ sandbox/task/libs/task/test/test_own_thread.cpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -129,7 +129,7 @@
BOOST_CHECK( ! finished);
BOOST_CHECK( h.is_ready() );
BOOST_CHECK( h.interruption_requested() );
- BOOST_CHECK_NO_THROW( h.get(), tsk::task_interrupted);
+ BOOST_CHECK_NO_THROW( h.get() );
}
// check waitfor_all()
Modified: sandbox/task/libs/task/test/test_unbounded_pool.cpp
==============================================================================
--- sandbox/task/libs/task/test/test_unbounded_pool.cpp (original)
+++ sandbox/task/libs/task/test/test_unbounded_pool.cpp 2009-05-29 18:08:57 EDT (Fri, 29 May 2009)
@@ -278,11 +278,8 @@
tsk::unbounded_channel< tsk::priority< int > >
> pool_type;
BOOST_CHECK( tsk::has_attribute< pool_type >::value);
- BOOST_CHECK(
- boost::is_same<
- tsk::attribute_type< pool_type >::type,
- int
- >::value);
+ typedef boost::is_same< tsk::attribute_type< pool_type >::type, int > type;
+ BOOST_CHECK( type::value);
pool_type pool( tsk::poolsize( 1) );
boost::barrier b( 2);
tsk::async(
@@ -320,11 +317,8 @@
tsk::unbounded_channel< tsk::smart< int, std::less< int >, tsk::replace_oldest, tsk::take_oldest > >
> pool_type;
BOOST_CHECK( tsk::has_attribute< pool_type >::value);
- BOOST_CHECK(
- boost::is_same<
- tsk::attribute_type< pool_type >::type,
- int
- >::value);
+ typedef boost::is_same< tsk::attribute_type< pool_type >::type, int > type;
+ BOOST_CHECK( type::value);
pool_type pool( tsk::poolsize( 1) );
boost::barrier b( 2);
pool.submit(
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