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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user