From 4b71ef93541cf96946cd8a1b72cd4729685efb5a Mon Sep 17 00:00:00 2001 From: "Vicente J. Botet Escriba" Date: Mon, 31 Dec 2012 09:57:10 +0000 Subject: [PATCH] Thread: Added noexcept to scoped_thread [SVN r82296] --- include/boost/thread/scoped_thread.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/boost/thread/scoped_thread.hpp b/include/boost/thread/scoped_thread.hpp index 2759e38e..370c1177 100644 --- a/include/boost/thread/scoped_thread.hpp +++ b/include/boost/thread/scoped_thread.hpp @@ -49,13 +49,15 @@ namespace boost * * 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 @@ namespace boost * * 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 @@ namespace boost /** * 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 @@ namespace boost /** * */ - void swap(scoped_thread& x)BOOST_NOEXCEPT + void swap(scoped_thread& x) BOOST_NOEXCEPT { t_.swap(x.t_); }