Remove Promise debug.

GitOrigin-RevId: b248c369954ae5ddd81437e4a2fdde245544d267
This commit is contained in:
levlam 2020-06-15 04:59:08 +03:00
parent 0cf4fea1ff
commit a5b0f205d1
2 changed files with 0 additions and 5 deletions

View File

@ -47,7 +47,6 @@ class RequestActor : public Actor {
}
stop();
} else {
LOG_CHECK(!promise.was_set_value) << future.empty() << " " << future.get_state();
CHECK(!future.empty());
CHECK(future.get_state() == FutureActor<T>::State::Waiting);
if (--tries_left_ == 0) {

View File

@ -62,12 +62,10 @@ class SafePromise;
template <class T = Unit>
class Promise {
public:
bool was_set_value{false};
void set_value(T &&value) {
if (!promise_) {
return;
}
was_set_value = true;
promise_->set_value(std::move(value));
promise_.reset();
}
@ -75,7 +73,6 @@ class Promise {
if (!promise_) {
return;
}
was_set_value = true;
promise_->set_error(std::move(error));
promise_.reset();
}
@ -83,7 +80,6 @@ class Promise {
if (!promise_) {
return;
}
was_set_value = true;
promise_->set_result(std::move(result));
promise_.reset();
}