diff options
author | 2016-03-03 13:57:32 -0800 | |
---|---|---|
committer | 2016-03-03 13:57:32 -0800 | |
commit | 13ee2f2df3ded81d096a1440a0f273eeece6a2cc (patch) | |
tree | 5d2de10915f70e0bb48dd4b20dc5fcd7f0a2078f /include/grpc++/impl/codegen/server_context.h | |
parent | 4473dd5b88bf18c51f7574bc835c4c74c08ecc80 (diff) |
Properly integrate async API with server-side cancellations.
There is a comment above IsCancelled that says when it is ok to use this.
Diffstat (limited to 'include/grpc++/impl/codegen/server_context.h')
-rw-r--r-- | include/grpc++/impl/codegen/server_context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index ad08b8210d..91ebe574b1 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -103,6 +103,9 @@ class ServerContext { void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); + // IsCancelled is always safe to call when using sync API + // When using async API, it is only safe to call IsCancelled after + // the AsyncNotifyWhenDone tag has been delivered bool IsCancelled() const; // Cancel the Call from the server. This is a best-effort API and depending on |