From 8ac56c9607b6953576d1a2e455f52b68e64cea57 Mon Sep 17 00:00:00 2001 From: Craig Tiller <craig.tiller@gmail.com> Date: Tue, 17 Feb 2015 22:51:36 -0800 Subject: [PATCH] Clarify completion queue laws --- include/grpc/grpc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 904853d984..34bfb61f70 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -370,7 +370,12 @@ grpc_event *grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, void grpc_event_finish(grpc_event *event); /* Begin destruction of a completion queue. Once all possible events are - drained it's safe to call grpc_completion_queue_destroy. */ + drained then grpc_completion_queue_next will start to produce + GRPC_QUEUE_SHUTDOWN events only. At that point it's safe to call + grpc_completion_queue_destroy. + + After calling this function applications should ensure that no + NEW work is added to be published on this completion queue. */ void grpc_completion_queue_shutdown(grpc_completion_queue *cq); /* Destroy a completion queue. The caller must ensure that the queue is -- GitLab