|
|
|
@ -23,6 +23,7 @@ |
|
|
|
|
|
|
|
|
|
#include "absl/base/attributes.h" |
|
|
|
|
#include "absl/log/check.h" |
|
|
|
|
#include "absl/log/log.h" |
|
|
|
|
#include "absl/strings/str_cat.h" |
|
|
|
|
|
|
|
|
|
#include <grpc/support/log.h> |
|
|
|
@ -144,21 +145,20 @@ struct SeqState<Traits, P, F0> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/2", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/2"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/2 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/2 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -177,14 +177,14 @@ struct SeqState<Traits, P, F0> { |
|
|
|
|
default: |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/2", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/2"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/2 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/2 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -287,21 +287,20 @@ struct SeqState<Traits, P, F0, F1> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/3", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/3"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/3 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/3 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -319,21 +318,20 @@ struct SeqState<Traits, P, F0, F1> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/3", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/3"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/3 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/3 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -352,14 +350,14 @@ struct SeqState<Traits, P, F0, F1> { |
|
|
|
|
default: |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/3", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/3"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/3 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/3 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -489,21 +487,20 @@ struct SeqState<Traits, P, F0, F1, F2> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/4", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/4"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/4 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/4 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -521,21 +518,20 @@ struct SeqState<Traits, P, F0, F1, F2> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/4", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/4"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/4 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/4 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -553,21 +549,20 @@ struct SeqState<Traits, P, F0, F1, F2> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/4", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/4"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult2* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/4 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/4 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits2::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -586,14 +581,14 @@ struct SeqState<Traits, P, F0, F1, F2> { |
|
|
|
|
default: |
|
|
|
|
case State::kState3: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 4/4", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 4/4"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 4/4 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 4/4 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -751,21 +746,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/5", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/5"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/5 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/5 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -783,21 +777,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/5", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/5"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/5 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/5 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -815,21 +808,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/5", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/5"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult2* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/5 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/5 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits2::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -847,21 +839,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState3: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 4/5", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 4/5"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult3* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 4/5 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 4/5 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits3::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -880,14 +871,14 @@ struct SeqState<Traits, P, F0, F1, F2, F3> { |
|
|
|
|
default: |
|
|
|
|
case State::kState4: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 5/5", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 5/5"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 5/5 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 5/5 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1082,21 +1073,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/6", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/6"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/6 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/6 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1115,21 +1105,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/6", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/6"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/6 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/6 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1147,21 +1136,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/6", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/6"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult2* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/6 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/6 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits2::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1179,21 +1167,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState3: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 4/6", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 4/6"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult3* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 4/6 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 4/6 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits3::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1211,21 +1198,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState4: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 5/6", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 5/6"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult4* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 5/6 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 5/6 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits4::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1249,9 +1235,9 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> { |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 6/6 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 6/6 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1478,21 +1464,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1511,21 +1496,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1544,21 +1528,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult2* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits2::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1576,21 +1559,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState3: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 4/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 4/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult3* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 4/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 4/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits3::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1608,21 +1590,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState4: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 5/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 5/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult4* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 5/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 5/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits4::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1640,21 +1621,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState5: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 6/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 6/7"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult5* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 6/7 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 6/7 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits5::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits5::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits5::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1673,14 +1653,14 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> { |
|
|
|
|
default: |
|
|
|
|
case State::kState6: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 7/7", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 7/7"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 7/7 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 7/7 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1940,22 +1920,21 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
switch (state) { |
|
|
|
|
case State::kState0: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 1/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 1/8"; |
|
|
|
|
} |
|
|
|
|
auto result = |
|
|
|
|
prior.prior.prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult0* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 1/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 1/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits0::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits0::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -1975,21 +1954,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState1: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 2/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 2/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult1* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 2/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 2/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits1::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits1::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2008,21 +1986,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState2: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 3/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 3/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult2* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 3/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 3/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits2::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits2::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2041,21 +2018,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState3: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 4/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 4/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult3* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 4/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 4/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits3::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits3::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2073,21 +2049,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState4: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 5/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 5/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.prior.current_promise(); |
|
|
|
|
PromiseResult4* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 5/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 5/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits4::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits4::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2105,21 +2080,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState5: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 6/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 6/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.prior.current_promise(); |
|
|
|
|
PromiseResult5* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 6/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 6/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits5::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits5::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits5::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2137,21 +2111,20 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
ABSL_FALLTHROUGH_INTENDED; |
|
|
|
|
case State::kState6: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 7/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 7/8"; |
|
|
|
|
} |
|
|
|
|
auto result = prior.current_promise(); |
|
|
|
|
PromiseResult6* p = result.value_if_ready(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log( |
|
|
|
|
whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 7/8 gets %s", this, |
|
|
|
|
p != nullptr |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 7/8 gets " |
|
|
|
|
<< (p != nullptr |
|
|
|
|
? (PromiseResultTraits6::IsOk(*p) |
|
|
|
|
? "ready" |
|
|
|
|
: absl::StrCat("early-error:", |
|
|
|
|
PromiseResultTraits6::ErrorString(*p)) |
|
|
|
|
.c_str()) |
|
|
|
|
: absl::StrCat( |
|
|
|
|
"early-error:", |
|
|
|
|
PromiseResultTraits6::ErrorString(*p))) |
|
|
|
|
: "pending"); |
|
|
|
|
} |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
@ -2170,14 +2143,14 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> { |
|
|
|
|
default: |
|
|
|
|
case State::kState7: { |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: begin poll step 8/8", this); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: begin poll step 8/8"; |
|
|
|
|
} |
|
|
|
|
auto result = current_promise(); |
|
|
|
|
if (grpc_trace_promise_primitives.enabled()) { |
|
|
|
|
gpr_log(whence.file(), whence.line(), GPR_LOG_SEVERITY_INFO, |
|
|
|
|
"seq[%p]: poll step 8/8 gets %s", this, |
|
|
|
|
result.ready() ? "ready" : "pending"); |
|
|
|
|
LOG(INFO).AtLocation(whence.file(), whence.line()) |
|
|
|
|
<< "seq[" << this << "]: poll step 8/8 gets " |
|
|
|
|
<< (result.ready() ? "ready" : "pending"); |
|
|
|
|
} |
|
|
|
|
auto* p = result.value_if_ready(); |
|
|
|
|
if (p == nullptr) return Pending{}; |
|
|
|
|