From 5fcb8cc271a66868328d72f6e8e8f20d8316acc5 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 7 Mar 2017 14:57:35 -0800 Subject: [PATCH] Php: Completion queue create API changes (and also remove the redundant completion_queue_next() loop in grpc_php_shutdown_completion_queue function as it is no longer needed. This was most likely an artifact of a previous version of grpc-core where completion queues did not have a "one tag in, one tag out" rule --- src/php/ext/grpc/completion_queue.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/php/ext/grpc/completion_queue.c b/src/php/ext/grpc/completion_queue.c index 741204b0b10..441088bf680 100644 --- a/src/php/ext/grpc/completion_queue.c +++ b/src/php/ext/grpc/completion_queue.c @@ -38,13 +38,12 @@ grpc_completion_queue *completion_queue; void grpc_php_init_completion_queue(TSRMLS_D) { - completion_queue = grpc_completion_queue_create(NULL); + completion_queue = grpc_completion_queue_create(GRPC_CQ_PLUCK, + GRPC_CQ_DEFAULT_POLLING, + NULL); } void grpc_php_shutdown_completion_queue(TSRMLS_D) { grpc_completion_queue_shutdown(completion_queue); - while (grpc_completion_queue_next(completion_queue, - gpr_inf_future(GPR_CLOCK_REALTIME), - NULL).type != GRPC_QUEUE_SHUTDOWN); grpc_completion_queue_destroy(completion_queue); }