2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 13:42:21 +00:00

apply noexcept

This commit is contained in:
Oliver Kowalke
2015-11-25 19:32:32 +01:00
parent a344247f07
commit 7bd1863115
2 changed files with 7 additions and 7 deletions

View File

@@ -254,7 +254,7 @@ public:
static void reset_active() noexcept;
// main fiber context
context( main_context_t);
context( main_context_t) noexcept;
// dispatcher fiber context
context( dispatcher_context_t, boost::context::preallocated const&,
@@ -272,7 +272,7 @@ public:
// mutable: generated operator() is not const -> enables std::move( fn)
// std::make_tuple: stores decayed copies of its args, implicitly unwraps std::reference_wrapper
[this,fn_=std::forward< Fn >( fn),tpl_=std::make_tuple( std::forward< Args >( args) ...),
ctx=boost::context::execution_context::current()] (void *) mutable -> void {
ctx=boost::context::execution_context::current()] (void *) mutable noexcept {
try {
auto fn( std::move( fn_) );
auto tpl( std::move( tpl_) );
@@ -305,7 +305,7 @@ public:
ctx_();
}
virtual ~context();
virtual ~context() noexcept;
scheduler * get_scheduler() const noexcept;
@@ -445,7 +445,7 @@ public:
struct context_initializer {
context_initializer();
~context_initializer();
~context_initializer() noexcept;
};
template< typename StackAlloc, typename Fn, typename ... Args >

View File

@@ -115,7 +115,7 @@ context_initializer::context_initializer() {
}
}
context_initializer::~context_initializer() {
context_initializer::~context_initializer() noexcept {
if ( 0 == --counter) {
context * main_ctx = context::active_;
BOOST_ASSERT( main_ctx->is_main_context() );
@@ -147,7 +147,7 @@ context::reset_active() noexcept {
}
// main fiber context
context::context( main_context_t) :
context::context( main_context_t) noexcept :
use_count_( 1), // allocated on main- or thread-stack
flags_( flag_main_context),
scheduler_( nullptr),
@@ -195,7 +195,7 @@ context::context( dispatcher_context_t, boost::context::preallocated const& pall
properties_( nullptr) {
}
context::~context() {
context::~context() noexcept {
BOOST_ASSERT( wait_queue_.empty() );
BOOST_ASSERT( ! ready_is_linked() );
BOOST_ASSERT( ! remote_ready_is_linked() );