Reviewer comments

reviewable/pr20892/r2
Yash Tibrewal 5 years ago
parent dd468c9268
commit 57c0ac011d
  1. 1
      src/core/ext/filters/client_channel/client_channel.cc
  2. 2
      src/core/lib/iomgr/call_combiner.h
  3. 40
      src/core/lib/iomgr/exec_ctx.cc

@ -2059,6 +2059,7 @@ void CallData::Destroy(grpc_call_element* elem,
then_schedule_closure = nullptr;
}
calld->~CallData();
// TODO(yashkt) : This can potentially be a Closure::Run
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
}

@ -157,7 +157,7 @@ class CallCombinerClosureList {
//
// All but one of the closures in the list will be scheduled via
// GRPC_CALL_COMBINER_START(), and the remaining closure will be
// scheduled via ExecCtx::Run(DEBUG_LOCATION,), which will eventually result
// scheduled via ExecCtx::Run(), which will eventually result
// in yielding the call combiner. If the list is empty, then the call
// combiner will be yielded immediately.
void RunClosures(CallCombiner* call_combiner) {

@ -176,28 +176,28 @@ grpc_millis ExecCtx::Now() {
void ExecCtx::Run(const DebugLocation& location, grpc_closure* closure,
grpc_error* error) {
if (closure != nullptr) {
#ifndef NDEBUG
if (closure->scheduled) {
gpr_log(GPR_ERROR,
"Closure already scheduled. (closure: %p, created: [%s:%d], "
"previously scheduled at: [%s: %d], newly scheduled at [%s: %d], "
"run?: %s",
closure, closure->file_created, closure->line_created,
closure->file_initiated, closure->line_initiated, location.file(),
location.line(), closure->run ? "true" : "false");
abort();
}
closure->scheduled = true;
closure->file_initiated = location.file();
closure->line_initiated = location.line();
closure->run = false;
GPR_ASSERT(closure->cb != nullptr);
#endif
exec_ctx_sched(closure, error);
} else {
if (closure == nullptr) {
GRPC_ERROR_UNREF(error);
return;
}
#ifndef NDEBUG
if (closure->scheduled) {
gpr_log(GPR_ERROR,
"Closure already scheduled. (closure: %p, created: [%s:%d], "
"previously scheduled at: [%s: %d], newly scheduled at [%s: %d], "
"run?: %s",
closure, closure->file_created, closure->line_created,
closure->file_initiated, closure->line_initiated, location.file(),
location.line(), closure->run ? "true" : "false");
abort();
}
closure->scheduled = true;
closure->file_initiated = location.file();
closure->line_initiated = location.line();
closure->run = false;
GPR_ASSERT(closure->cb != nullptr);
#endif
exec_ctx_sched(closure, error);
}
} // namespace grpc_core

Loading…
Cancel
Save