Skip to content

Commit

Permalink
Python: wordsmith documentation on Server.stop()
Browse files Browse the repository at this point in the history
@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.
  • Loading branch information
durin42 committed May 31, 2018
1 parent 2a0d447 commit 38689e6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/python/grpcio/grpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,19 +1250,20 @@ def stop(self, grace):
"""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.
Expand Down

0 comments on commit 38689e6

Please sign in to comment.