aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-03 17:24:50 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-06 13:22:44 -0700
commita134fa7036d51e539714fa41b0ec780e084bab46 (patch)
tree8d03f071b50bce4d824e5a0109b9db5df438eb7c
parent6acc07d50dd33a63f492084ae035b268324bcff3 (diff)
improve docs on ShutdownAsync() for servers and channels
-rw-r--r--src/csharp/Grpc.Core/Channel.cs11
-rw-r--r--src/csharp/Grpc.Core/Server.cs6
2 files changed, 15 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs
index 2ec763bec1..9cee752663 100644
--- a/src/csharp/Grpc.Core/Channel.cs
+++ b/src/csharp/Grpc.Core/Channel.cs
@@ -192,9 +192,16 @@ namespace Grpc.Core
}
/// <summary>
- /// Waits until there are no more active calls for this channel and then cleans up
- /// resources used by this channel.
+ /// Shuts down the channel cleanly. It is strongly recommended to shutdown
+ /// all previously created channels before exiting from the process.
/// </summary>
+ /// <remarks>
+ /// This method doesn't wait for all calls on this channel to finish (nor does
+ /// it explicitly cancel all outstanding calls). It is user's responsibility to make sure
+ /// all the calls on this channel have finished (successfully or with an error)
+ /// before shutting down the channel to ensure channel shutdown won't impact
+ /// the outcome of those remote calls.
+ /// </remarks>
public async Task ShutdownAsync()
{
lock (myLock)
diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs
index 069185e13a..6bd7900561 100644
--- a/src/csharp/Grpc.Core/Server.cs
+++ b/src/csharp/Grpc.Core/Server.cs
@@ -152,6 +152,9 @@ namespace Grpc.Core
/// cleans up used resources. The returned task finishes when shutdown procedure
/// is complete.
/// </summary>
+ /// <remarks>
+ /// It is strongly recommended to shutdown all previously created servers before exiting from the process.
+ /// </remarks>
public async Task ShutdownAsync()
{
lock (myLock)
@@ -173,6 +176,9 @@ namespace Grpc.Core
/// Requests server shutdown while cancelling all the in-progress calls.
/// The returned task finishes when shutdown procedure is complete.
/// </summary>
+ /// <remarks>
+ /// It is strongly recommended to shutdown all previously created servers before exiting from the process.
+ /// </remarks>
public async Task KillAsync()
{
lock (myLock)