Revert "[chttp2] Use Closure::Run to invoke callbacks" (#30143)

* Revert "[chttp2] Use Closure::Run to invoke callbacks (#29844)"

This reverts commit e7b1ad09af.

* Update chttp2_transport.cc

* Automated change: Fix sanity tests (#30144)

Co-authored-by: ctiller <ctiller@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
pull/30147/head
Craig Tiller 3 years ago committed by GitHub
parent 8921ea4085
commit 647b23a070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc

@ -1216,7 +1216,13 @@ static grpc_closure* add_closure_barrier(grpc_closure* closure) {
static void null_then_sched_closure(grpc_closure** closure) {
grpc_closure* c = *closure;
*closure = nullptr;
grpc_core::Closure::Run(DEBUG_LOCATION, c, GRPC_ERROR_NONE);
// null_then_schedule_closure might be run during a start_batch which might
// subsequently examine the batch for more operations contained within.
// However, the closure run might make it back to the call object, push a
// completion, have the application see it, and make a new operation on the
// call which recycles the batch BEFORE the call to start_batch completes,
// forcing a race.
grpc_core::ExecCtx::Run(DEBUG_LOCATION, c, GRPC_ERROR_NONE);
}
void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t,

Loading…
Cancel
Save