Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69109 - sandbox/async/boost/tp
From: vicente.botet_at_[hidden]
Date: 2011-02-20 18:18:18


Author: viboes
Date: 2011-02-20 18:18:17 EST (Sun, 20 Feb 2011)
New Revision: 69109
URL: http://svn.boost.org/trac/boost/changeset/69109

Log:
Async.TP: Overload move for packaged_task
Text files modified:
   sandbox/async/boost/tp/pool.hpp | 14 ++++++++++----
   1 files changed, 10 insertions(+), 4 deletions(-)

Modified: sandbox/async/boost/tp/pool.hpp
==============================================================================
--- sandbox/async/boost/tp/pool.hpp (original)
+++ sandbox/async/boost/tp/pool.hpp 2011-02-20 18:18:17 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -77,6 +77,12 @@
 
 namespace tp
 {
+template<typename T>
+boost::detail::thread_move_t<boost::packaged_task<T> > move(boost::packaged_task<T>& t)
+{
+ return boost::detail::thread_move_t<boost::packaged_task<T> >(t);
+}
+
 template< typename Channel >
 class pool : private noncopyable
 {
@@ -236,9 +242,9 @@
                 lk.unlock();
                 BOOST_ASSERT( i != iidx.end() );
                 detail::worker::tss_reset( new detail::worker( * i) );
-
+
                 detail::worker * w( detail::worker::tss_get() );
- BOOST_ASSERT( w);
+ BOOST_ASSERT( w);
                 BOOST_ASSERT( w->get_id() == this_thread::get_id() );
                 shared_ptr< thread > thrd( w->thrd() );
                 BOOST_ASSERT( thrd);


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