Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82296 - trunk/boost/thread
From: vicente.botet_at_[hidden]
Date: 2012-12-31 04:57:11


Author: viboes
Date: 2012-12-31 04:57:10 EST (Mon, 31 Dec 2012)
New Revision: 82296
URL: http://svn.boost.org/trac/boost/changeset/82296

Log:
Thread: Added noexcept to scoped_thread
Text files modified:
   trunk/boost/thread/scoped_thread.hpp | 12 +++++++-----
   1 files changed, 7 insertions(+), 5 deletions(-)

Modified: trunk/boost/thread/scoped_thread.hpp
==============================================================================
--- trunk/boost/thread/scoped_thread.hpp (original)
+++ trunk/boost/thread/scoped_thread.hpp 2012-12-31 04:57:10 EST (Mon, 31 Dec 2012)
@@ -49,13 +49,15 @@
      *
      * Effects: move the thread to own @c t.
      */
- explicit strict_scoped_thread(BOOST_THREAD_RV_REF(thread) t) :
+ explicit strict_scoped_thread(BOOST_THREAD_RV_REF(thread) t) BOOST_NOEXCEPT :
     t_(boost::move(t))
     {
     }
 
     /**
      * Destructor
+ * Effects: Call the CallableThread functor before destroying the owned thread.
+ * Remark: The CallableThread should not throw when joining the thread as the scoped variable is on a scope outside the thread function.
      */
     ~strict_scoped_thread()
     {
@@ -112,7 +114,7 @@
      *
      * Effects: move the thread to own @c t.
      */
- explicit scoped_thread(BOOST_THREAD_RV_REF(thread) t) :
+ explicit scoped_thread(BOOST_THREAD_RV_REF(thread) t) BOOST_NOEXCEPT :
     t_(boost::move(t))
     {
     }
@@ -125,14 +127,14 @@
     /**
      * Move constructor.
      */
- scoped_thread(BOOST_RV_REF(scoped_thread) x) :
+ scoped_thread(BOOST_RV_REF(scoped_thread) x) BOOST_NOEXCEPT :
     t_(boost::move(x.t_))
     {}
 
     /**
      * Destructor
      *
- * Effects: destroys the internal destroyer before destroying the owned thread.
+ * Effects: Call the CallableThread functor before destroying the owned thread.
      */
     ~scoped_thread()
     {
@@ -153,7 +155,7 @@
     /**
      *
      */
- void swap(scoped_thread& x)BOOST_NOEXCEPT
+ void swap(scoped_thread& x) BOOST_NOEXCEPT
     {
       t_.swap(x.t_);
     }


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