Python changes

reviewable/pr9972/r1
Sree Kuchibhotla 8 years ago
parent 3a55efaed7
commit 56b1032feb
  1. 2
      src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
  2. 14
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi

@ -40,7 +40,7 @@ cdef class CompletionQueue:
def __cinit__(self): def __cinit__(self):
grpc_init() grpc_init()
with nogil: with nogil:
self.c_completion_queue = grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL) self.c_completion_queue = grpc_completion_queue_create_for_next(NULL)
self.is_shutting_down = False self.is_shutting_down = False
self.is_shutdown = False self.is_shutdown = False

@ -309,19 +309,7 @@ cdef extern from "grpc/grpc.h":
void grpc_init() nogil void grpc_init() nogil
void grpc_shutdown() nogil void grpc_shutdown() nogil
ctypedef enum grpc_cq_completion_type: grpc_completion_queue *grpc_completion_queue_create_for_next(void *reserved) nogil
GRPC_CQ_NEXT = 1
GRPC_CQ_PLUCK = 2
ctypedef enum grpc_cq_polling_type:
GRPC_CQ_DEFAULT_POLLING
GRPC_CQ_NON_LISTENING
GRPC_CQ_NON_POLLING
grpc_completion_queue *grpc_completion_queue_create(
grpc_cq_completion_type completion_type,
grpc_cq_polling_type polling_type,
void *reserved) nogil
grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, grpc_event grpc_completion_queue_next(grpc_completion_queue *cq,
gpr_timespec deadline, gpr_timespec deadline,

Loading…
Cancel
Save