Remove Promise debug.
GitOrigin-RevId: b248c369954ae5ddd81437e4a2fdde245544d267
This commit is contained in:
parent
0cf4fea1ff
commit
a5b0f205d1
@ -47,7 +47,6 @@ class RequestActor : public Actor {
|
|||||||
}
|
}
|
||||||
stop();
|
stop();
|
||||||
} else {
|
} else {
|
||||||
LOG_CHECK(!promise.was_set_value) << future.empty() << " " << future.get_state();
|
|
||||||
CHECK(!future.empty());
|
CHECK(!future.empty());
|
||||||
CHECK(future.get_state() == FutureActor<T>::State::Waiting);
|
CHECK(future.get_state() == FutureActor<T>::State::Waiting);
|
||||||
if (--tries_left_ == 0) {
|
if (--tries_left_ == 0) {
|
||||||
|
@ -62,12 +62,10 @@ class SafePromise;
|
|||||||
template <class T = Unit>
|
template <class T = Unit>
|
||||||
class Promise {
|
class Promise {
|
||||||
public:
|
public:
|
||||||
bool was_set_value{false};
|
|
||||||
void set_value(T &&value) {
|
void set_value(T &&value) {
|
||||||
if (!promise_) {
|
if (!promise_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
was_set_value = true;
|
|
||||||
promise_->set_value(std::move(value));
|
promise_->set_value(std::move(value));
|
||||||
promise_.reset();
|
promise_.reset();
|
||||||
}
|
}
|
||||||
@ -75,7 +73,6 @@ class Promise {
|
|||||||
if (!promise_) {
|
if (!promise_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
was_set_value = true;
|
|
||||||
promise_->set_error(std::move(error));
|
promise_->set_error(std::move(error));
|
||||||
promise_.reset();
|
promise_.reset();
|
||||||
}
|
}
|
||||||
@ -83,7 +80,6 @@ class Promise {
|
|||||||
if (!promise_) {
|
if (!promise_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
was_set_value = true;
|
|
||||||
promise_->set_result(std::move(result));
|
promise_->set_result(std::move(result));
|
||||||
promise_.reset();
|
promise_.reset();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user