better visibility into seqs

pull/38135/head
Craig Tiller 1 week ago
parent 602c3ac545
commit 52a78995d2
  1. 360
      src/core/lib/promise/detail/seq_state.h
  2. 8
      tools/codegen/core/gen_seq.py

File diff suppressed because it is too large Load Diff

@ -133,11 +133,11 @@ tail${i}:
switch (state) {
% for i in range(0,n-1):
case State::kState${i}: {
GRPC_TRACE_VLOG(promise_primitives, 2).AtLocation(whence.file(), whence.line())
GRPC_TRACE_LOG(promise_primitives, INFO).AtLocation(whence.file(), whence.line())
<< "seq[" << this << "]: begin poll step ${i+1}/${n}";
auto result = ${"prior."*(n-1-i)}current_promise();
PromiseResult${i}* p = result.value_if_ready();
GRPC_TRACE_VLOG(promise_primitives, 2).AtLocation(whence.file(), whence.line())
GRPC_TRACE_LOG(promise_primitives, INFO).AtLocation(whence.file(), whence.line())
<< "seq[" << this << "]: poll step ${i+1}/${n} gets "
<< (p != nullptr
? (PromiseResultTraits${i}::IsOk(*p)
@ -158,10 +158,10 @@ tail${i}:
% endfor
default:
case State::kState${n-1}: {
GRPC_TRACE_VLOG(promise_primitives, 2).AtLocation(whence.file(), whence.line())
GRPC_TRACE_LOG(promise_primitives, INFO).AtLocation(whence.file(), whence.line())
<< "seq[" << this << "]: begin poll step ${n}/${n}";
auto result = current_promise();
GRPC_TRACE_VLOG(promise_primitives, 2).AtLocation(whence.file(), whence.line())
GRPC_TRACE_LOG(promise_primitives, INFO).AtLocation(whence.file(), whence.line())
<< "seq[" << this << "]: poll step ${n}/${n} gets "
<< (result.ready()? "ready" : "pending");
auto* p = result.value_if_ready();

Loading…
Cancel
Save