virtual destructor in exec_ctx, remove unneeded flush in grpc_shutdown and remove grpc_exec_ctx from .pxi files in python

pull/13659/head
Yash Tibrewal 7 years ago
parent d6c292f177
commit caaf416eba
  1. 2
      src/core/ext/filters/client_channel/lb_policy.cc
  2. 2
      src/core/lib/iomgr/exec_ctx.h
  3. 3
      src/core/lib/surface/init.cc
  4. 9
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  5. 2
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi

@ -130,7 +130,7 @@ void grpc_lb_policy_exit_idle_locked(grpc_lb_policy* policy) {
void grpc_lb_policy_ping_one_locked(grpc_lb_policy* policy,
grpc_closure* on_initiate,
grpc_closure* on_ack) {
policy->vtable->ping_one_locked(exec_ctx, policy, on_initiate, on_ack);
policy->vtable->ping_one_locked(policy, on_initiate, on_ack);
}
void grpc_lb_policy_notify_on_state_change_locked(

@ -80,7 +80,7 @@ class ExecCtx {
ExecCtx(uintptr_t fl) : flags_(fl) { Set(this); }
/** Destructor */
~ExecCtx() {
virtual ~ExecCtx() {
flags_ |= GRPC_EXEC_CTX_FLAG_IS_FINISHED;
Flush();
Set(last_exec_ctx_);

@ -157,9 +157,6 @@ void grpc_init(void) {
void grpc_shutdown(void) {
int i;
GRPC_API_TRACE("grpc_shutdown(void)", 0, ());
if (grpc_core::ExecCtx::Get()) {
grpc_core::ExecCtx::Get()->Flush();
}
gpr_mu_lock(&g_init_mu);
if (--g_initializations == 0) {
{

@ -36,13 +36,6 @@ cdef extern from "grpc/byte_buffer_reader.h":
pass
cdef extern from "grpc/impl/codegen/exec_ctx_fwd.h":
struct grpc_exec_ctx:
# We don't care about the internals
pass
cdef extern from "grpc/grpc.h":
ctypedef struct grpc_slice:
@ -169,7 +162,7 @@ cdef extern from "grpc/grpc.h":
ctypedef struct grpc_arg_pointer_vtable:
void *(*copy)(void *)
void (*destroy)(grpc_exec_ctx *, void *)
void (*destroy)(void *)
int (*cmp)(void *, void *)
ctypedef struct grpc_arg_value_pointer:

@ -320,7 +320,7 @@ cdef void* copy_ptr(void* ptr):
return ptr
cdef void destroy_ptr(grpc_exec_ctx* ctx, void* ptr):
cdef void destroy_ptr(void* ptr):
pass

Loading…
Cancel
Save