Adding documentation to the new ref-count mechanism

pull/21621/head
Lidi Zheng 5 years ago
parent 7520925814
commit 4a86bb16f5
  1. 3
      src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi

@ -41,6 +41,9 @@ cdef class CallbackWrapper:
# data path. We should make it as efficient as possible.
self._reference_of_future = future
self._reference_of_failure_handler = failure_handler
# NOTE(lidiz) We need to ensure when Core invokes our callback, the
# callback function itself is not deallocated. Othersise, we will get
# a segfault. We can view this as Core holding a ref.
cpython.Py_INCREF(self)
@staticmethod

Loading…
Cancel
Save