Skip to content
Snippets Groups Projects
Commit 3406c876 authored by Sree Kuchibhotla's avatar Sree Kuchibhotla Committed by GitHub
Browse files

Merge pull request #4 from sreecha/cq_create_api_changes_python

Python: Completion queue creation API changes
parents 804a21a8 b4a6f908
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ cdef class CompletionQueue:
def __cinit__(self):
grpc_init()
with nogil:
self.c_completion_queue = grpc_completion_queue_create(NULL)
self.c_completion_queue = grpc_completion_queue_create(GRPC_CQ_NEXT, GRPC_CQ_DEFAULT_POLLING, NULL)
self.is_shutting_down = False
self.is_shutdown = False
......
......@@ -309,7 +309,20 @@ cdef extern from "grpc/grpc.h":
void grpc_init() nogil
void grpc_shutdown() nogil
grpc_completion_queue *grpc_completion_queue_create(void *reserved) nogil
ctypedef enum grpc_cq_completion_type:
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,
gpr_timespec deadline,
void *reserved) nogil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment