diff options
author | Augie Fackler <augie@google.com> | 2018-05-31 17:07:13 -0400 |
---|---|---|
committer | Augie Fackler <augie@google.com> | 2018-05-31 17:25:58 -0400 |
commit | 38689e65871aa69daff19761ef25768a8142c3aa (patch) | |
tree | f923e389120cd5b951628fdb3af129769ff9a016 /src/python/grpcio/grpc/__init__.py | |
parent | 2a0d447d272cea8a5e077a16799f860edef7295e (diff) |
Python: wordsmith documentation on Server.stop()
@nathanielmanistaatgoogle and I just had a good session helping me
figure out how to use this API correctly, and this rewording of the
documentation was the result.
Diffstat (limited to 'src/python/grpcio/grpc/__init__.py')
-rw-r--r-- | src/python/grpcio/grpc/__init__.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index b7ed0c8563..0f31119467 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1250,19 +1250,20 @@ class Server(six.with_metaclass(abc.ABCMeta)): """Stops this Server. This method immediately stop service of new RPCs in all cases. + If a grace period is specified, this method returns immediately and all RPCs active at the end of the grace period are aborted. - - If a grace period is not specified, then all existing RPCs are - teriminated immediately and the this method blocks until the last - RPC handler terminates. + If a grace period is not specified (by passing None for `grace`), + all existing RPCs are aborted immediately and this method + blocks until the last RPC handler terminates. This method is idempotent and may be called at any time. - Passing a smaller grace value in subsequent call will have - the effect of stopping the Server sooner. Passing a larger - grace value in subsequent call *will not* have the effect of - stopping the server later (i.e. the most restrictive grace - value is used). + Passing a smaller grace value in a subsequent call will have + the effect of stopping the Server sooner (passing None will + have the effect of stopping the server immediately). Passing + a larger grace value in a subsequent call *will not* have the + effect of stopping the server later (i.e. the most restrictive + grace value is used). Args: grace: A duration of time in seconds or None. |