mirror of
https://github.com/BlackMATov/promise.hpp.git
synced 2025-12-13 11:56:26 +07:00
add wait noexcepts
This commit is contained in:
@@ -545,7 +545,7 @@ namespace promise_hpp
|
||||
return state_->get();
|
||||
}
|
||||
|
||||
void wait() const {
|
||||
void wait() const noexcept {
|
||||
state_->wait();
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ namespace promise_hpp
|
||||
return storage_.value();
|
||||
}
|
||||
|
||||
void wait() const {
|
||||
void wait() const noexcept {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
cond_var_.wait(lock, [this](){
|
||||
return status_ != status::pending;
|
||||
@@ -934,7 +934,7 @@ namespace promise_hpp
|
||||
state_->get();
|
||||
}
|
||||
|
||||
void wait() const {
|
||||
void wait() const noexcept {
|
||||
state_->wait();
|
||||
}
|
||||
|
||||
@@ -993,7 +993,7 @@ namespace promise_hpp
|
||||
assert(status_ == status::resolved);
|
||||
}
|
||||
|
||||
void wait() const {
|
||||
void wait() const noexcept {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
cond_var_.wait(lock, [this](){
|
||||
return status_ != status::pending;
|
||||
|
||||
Reference in New Issue
Block a user