|
|
|
@ -176,24 +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); |
|
|
|
|
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); |
|
|
|
|
exec_ctx_sched(closure, error); |
|
|
|
|
} else { |
|
|
|
|
GRPC_ERROR_UNREF(error); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // namespace grpc_core
|
|
|
|
|