diff options
author | Masood Malekghassemi <atash@google.com> | 2016-02-29 14:41:42 -0800 |
---|---|---|
committer | Masood Malekghassemi <atash@google.com> | 2016-02-29 14:48:33 -0800 |
commit | 334e0ee37012752a9747594dbdbde9f3f0dbc8d5 (patch) | |
tree | dab035c86ff4099d0a00923d434841f079eacaa5 /src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | |
parent | 1df086067c66abeaded61fc725144df780362c0e (diff) |
Address some memory hazards in Cython code
Some __dealloc__ methods were calling Python methods, and some
references were being dropped on the floor instead of threaded through
gRPC core.
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi')
-rw-r--r-- | src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index ac67f32d92..f68dfd1b24 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -89,12 +89,13 @@ cdef class Channel: def check_connectivity_state(self, bint try_to_connect): return grpc_channel_check_connectivity_state(self.c_channel, - try_to_connect) + try_to_connect) def watch_connectivity_state( - self, last_observed_state, Timespec deadline not None, - CompletionQueue queue not None, tag): + self, grpc_connectivity_state last_observed_state, + Timespec deadline not None, CompletionQueue queue not None, tag): cdef OperationTag operation_tag = OperationTag(tag) + operation_tag.references = [self, queue] cpython.Py_INCREF(operation_tag) grpc_channel_watch_connectivity_state( self.c_channel, last_observed_state, deadline.c_time, |