From aea2fc053d415b2650753509f65855cb92552ca9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 17 Feb 2015 16:54:53 -0800 Subject: Fix shutdown semantics. Document what they should be, ensure they're triggered, and fix what was broken. --- include/grpc/grpc.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 9807de9f4b..cf84ac1c63 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -564,15 +564,19 @@ void grpc_server_start(grpc_server *server); /* Begin shutting down a server. After completion, no new calls or connections will be admitted. - Existing calls will be allowed to complete. */ + Existing calls will be allowed to complete. + Shutdown is idempotent. */ void grpc_server_shutdown(grpc_server *server); /* As per grpc_server_shutdown, but send a GRPC_SERVER_SHUTDOWN event when - there are no more calls being serviced. */ + there are no more calls being serviced. + Shutdown is idempotent, and all tags will be notified at once if multiple + grpc_server_shutdown_and_notify calls are made. */ void grpc_server_shutdown_and_notify(grpc_server *server, void *tag); /* Destroy a server. - Forcefully cancels all existing calls. */ + Forcefully cancels all existing calls. + Implies grpc_server_shutdown() if one was not previously performed. */ void grpc_server_destroy(grpc_server *server); #ifdef __cplusplus -- cgit v1.2.3