From 05561ad5116c263f4b4e2da41905e74a11e94cee Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Wed, 12 Dec 2018 20:05:52 +0700 Subject: [PATCH] add wait noexcepts --- promise.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/promise.hpp b/promise.hpp index 00eb8c8..62678a8 100644 --- a/promise.hpp +++ b/promise.hpp @@ -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 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 lock(mutex_); cond_var_.wait(lock, [this](){ return status_ != status::pending;