diff options
author | 2018-10-30 23:13:11 -0700 | |
---|---|---|
committer | 2018-10-30 23:15:59 -0700 | |
commit | 2f47137a6e4dc05df4e09e47348aadbe21889d13 (patch) | |
tree | 7e1ef0a781f1298aec042aa30eca7451097f6e6d /include/grpcpp/impl/codegen/server_context.h | |
parent | b460622c2d8be2bddcb60cf0682d1b88d9c2357e (diff) |
Add support for IsCancelled check
Diffstat (limited to 'include/grpcpp/impl/codegen/server_context.h')
-rw-r--r-- | include/grpcpp/impl/codegen/server_context.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/grpcpp/impl/codegen/server_context.h b/include/grpcpp/impl/codegen/server_context.h index ecb9073cf9..82ee862f61 100644 --- a/include/grpcpp/impl/codegen/server_context.h +++ b/include/grpcpp/impl/codegen/server_context.h @@ -27,6 +27,7 @@ #include <grpcpp/impl/codegen/call.h> #include <grpcpp/impl/codegen/call_op_set.h> +#include <grpcpp/impl/codegen/callback_common.h> #include <grpcpp/impl/codegen/completion_queue_tag.h> #include <grpcpp/impl/codegen/config.h> #include <grpcpp/impl/codegen/create_auth_context.h> @@ -139,7 +140,7 @@ class ServerContext { /// must end in "-bin". void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); - /// IsCancelled is always safe to call when using sync API. + /// IsCancelled is always safe to call when using sync or callback API. /// When using async API, it is only safe to call IsCancelled after /// the AsyncNotifyWhenDone tag has been delivered. bool IsCancelled() const; @@ -281,7 +282,7 @@ class ServerContext { class CompletionOp; - void BeginCompletionOp(internal::Call* call); + void BeginCompletionOp(internal::Call* call, bool callback); /// Return the tag queued by BeginCompletionOp() internal::CompletionQueueTag* GetCompletionOpTag(); @@ -312,6 +313,7 @@ class ServerContext { CompletionOp* completion_op_; bool has_notify_when_done_tag_; void* async_notify_when_done_tag_; + internal::CallbackWithSuccessTag completion_tag_; gpr_timespec deadline_; grpc_call* call_; |