2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-19 14:22:23 +00:00

remove noexcept from channel::try_pop()

- move-op might throw
This commit is contained in:
Oliver Kowalke
2015-12-27 14:20:46 +01:00
parent 811347bce0
commit ba49a575ce
2 changed files with 4 additions and 4 deletions

View File

@@ -170,7 +170,7 @@ private:
++count_;
}
value_type value_pop_( std::unique_lock< boost::fibers::mutex > & lk) noexcept {
value_type value_pop_( std::unique_lock< boost::fibers::mutex > & lk) {
BOOST_ASSERT( ! is_empty_() );
auto old_head = pop_head_();
if ( size_() <= lwm_) {
@@ -369,7 +369,7 @@ public:
return value_pop_( lk);
}
channel_op_status try_pop( value_type & va) noexcept {
channel_op_status try_pop( value_type & va) {
std::unique_lock< mutex > lk( mtx_);
if ( is_closed_() && is_empty_() ) {
// let other fibers run

View File

@@ -126,7 +126,7 @@ private:
tail_ = & new_node->nxt;
}
value_type value_pop_( std::unique_lock< mutex > & lk) noexcept {
value_type value_pop_( std::unique_lock< mutex > & lk) {
BOOST_ASSERT( ! is_empty_() );
auto old_head = pop_head_();
return std::move( old_head->va);
@@ -210,7 +210,7 @@ public:
return value_pop_( lk);
}
channel_op_status try_pop( value_type & va) noexcept {
channel_op_status try_pop( value_type & va) {
std::unique_lock< mutex > lk( mtx_);
if ( is_closed_() && is_empty_() ) {
// let other fibers run