aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl/codegen
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2016-01-28 18:04:03 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2016-01-28 18:04:03 -0800
commitf25c6ba229d5ed18d16606e4b910232e774ed8a7 (patch)
tree4569aadb0247337cc95388ba31aa9cef62d6b144 /include/grpc++/impl/codegen
parent944f4cf14ece078f33d7c84d95521d55d646cb61 (diff)
Comments and format
Diffstat (limited to 'include/grpc++/impl/codegen')
-rw-r--r--include/grpc++/impl/codegen/server_context.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index 868b02882d..d3086aef0a 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -105,7 +105,15 @@ class ServerContext {
bool IsCancelled() const;
- // Best-effort API to cancel the call from the server.
+ // Cancel the Call from the server. This is a best-effort API and depending on
+ // when this is called, the Call may still appear successful to the client.
+ // For example, if called on a separate thread, it might race with the
+ // server handler which might return success to the client before TryCancel()
+ // was called.
+ //
+ // It is the caller's responsibility to prevent such races and ensure that the
+ // serverhandler returns Status::CANCELLED if TryCancel() is called (unless
+ // the serverhandler is already returning an error code)
void TryCancel() const;
const std::multimap<grpc::string_ref, grpc::string_ref>& client_metadata() {