aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
diff options
context:
space:
mode:
authorGravatar siddharthshukla <s.shukla@jacobs-university.de>2016-07-12 14:02:12 +0200
committerGravatar siddharthshukla <siddharthshukla@outlook.com>2016-08-05 20:14:20 +0200
commit9eedb4ffd74aed8d246a07f8007960b2bc167f55 (patch)
tree6eaacdc00465a55edb0343e81acc34b046babb79 /src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
parentffbfd01049fc2ae4e402539905ebcfa22c1094e8 (diff)
Switch init/shutdown: lib-wide -> per-object
Incremental changes towards PyPy support.
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
index 5955021ceb..a258ba4063 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
@@ -38,6 +38,7 @@ cdef int _INTERRUPT_CHECK_PERIOD_MS = 200
cdef class CompletionQueue:
def __cinit__(self):
+ grpc_init()
with nogil:
self.c_completion_queue = grpc_completion_queue_create(NULL)
self.is_shutting_down = False
@@ -129,3 +130,4 @@ cdef class CompletionQueue:
self.c_completion_queue, c_deadline, NULL)
self._interpret_event(event)
grpc_completion_queue_destroy(self.c_completion_queue)
+ grpc_shutdown()