diff options
author | ncteisen <ncteisen@gmail.com> | 2017-07-05 11:21:25 -0700 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2017-07-05 11:21:25 -0700 |
commit | 36bb8a00067a15db55d72b4ce4f2784d3ebb5caa (patch) | |
tree | 1d68e70ae0de8cbc09a218f1f73cc1dca41b8d86 /include/grpc++/impl | |
parent | 43f2b55a079660414b47d2de393ccd374be79fd2 (diff) |
s/hanging/pending/g
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r-- | include/grpc++/impl/codegen/method_handler_impl.h | 8 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/server_context.h | 4 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/sync_stream.h | 27 |
3 files changed, 20 insertions, 19 deletions
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 6ec2836037..15e24bdcdc 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -141,8 +141,8 @@ class ServerStreamingHandler : public MethodHandler { } ops.ServerSendStatus(param.server_context->trailing_metadata_, status); param.call->PerformOps(&ops); - if (param.server_context->has_hanging_ops_) { - param.call->cq()->Pluck(¶m.server_context->hanging_ops_); + if (param.server_context->has_pending_ops_) { + param.call->cq()->Pluck(¶m.server_context->pending_ops_); } param.call->cq()->Pluck(&ops); } @@ -188,8 +188,8 @@ class TemplatedBidiStreamingHandler : public MethodHandler { } ops.ServerSendStatus(param.server_context->trailing_metadata_, status); param.call->PerformOps(&ops); - if (param.server_context->has_hanging_ops_) { - param.call->cq()->Pluck(¶m.server_context->hanging_ops_); + if (param.server_context->has_pending_ops_) { + param.call->cq()->Pluck(¶m.server_context->pending_ops_); } param.call->cq()->Pluck(&ops); } diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index d7bd7323f2..d149987fa2 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -273,8 +273,8 @@ class ServerContext { uint32_t initial_metadata_flags() const { return 0; } - CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> hanging_ops_; - bool has_hanging_ops_; + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> pending_ops_; + bool has_pending_ops_; CompletionOp* completion_op_; bool has_notify_when_done_tag_; void* async_notify_when_done_tag_; diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 677fa78d9e..3fa208963d 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -589,27 +589,27 @@ class ServerWriter final : public ServerWriterInterface<W> { if (options.is_last_message()) { options.set_buffer_hint(); } - if (!ctx_->hanging_ops_.SendMessage(msg, options).ok()) { + if (!ctx_->pending_ops_.SendMessage(msg, options).ok()) { return false; } if (!ctx_->sent_initial_metadata_) { - ctx_->hanging_ops_.SendInitialMetadata(ctx_->initial_metadata_, + ctx_->pending_ops_.SendInitialMetadata(ctx_->initial_metadata_, ctx_->initial_metadata_flags()); if (ctx_->compression_level_set()) { - ctx_->hanging_ops_.set_compression_level(ctx_->compression_level()); + ctx_->pending_ops_.set_compression_level(ctx_->compression_level()); } ctx_->sent_initial_metadata_ = true; } - call_->PerformOps(&ctx_->hanging_ops_); + call_->PerformOps(&ctx_->pending_ops_); // if this is the last message we defer the pluck until AFTER we start // the trailing md op. This prevents hangs. See // https://github.com/grpc/grpc/issues/11546 if (options.is_last_message()) { - ctx_->has_hanging_ops_ = true; + ctx_->has_pending_ops_ = true; return true; } - ctx_->has_hanging_ops_ = false; - return call_->cq()->Pluck(&ctx_->hanging_ops_); + ctx_->has_pending_ops_ = false; + return call_->cq()->Pluck(&ctx_->pending_ops_); } private: @@ -661,26 +661,27 @@ class ServerReaderWriterBody final { if (options.is_last_message()) { options.set_buffer_hint(); } - if (!ctx_->hanging_ops_.SendMessage(msg, options).ok()) { + if (!ctx_->pending_ops_.SendMessage(msg, options).ok()) { return false; } if (!ctx_->sent_initial_metadata_) { - ctx_->hanging_ops_.SendInitialMetadata(ctx_->initial_metadata_, + ctx_->pending_ops_.SendInitialMetadata(ctx_->initial_metadata_, ctx_->initial_metadata_flags()); if (ctx_->compression_level_set()) { - ctx_->hanging_ops_.set_compression_level(ctx_->compression_level()); + ctx_->pending_ops_.set_compression_level(ctx_->compression_level()); } ctx_->sent_initial_metadata_ = true; } - call_->PerformOps(&ctx_->hanging_ops_); + call_->PerformOps(&ctx_->pending_ops_); // if this is the last message we defer the pluck until AFTER we start // the trailing md op. This prevents hangs. See // https://github.com/grpc/grpc/issues/11546 if (options.is_last_message()) { - ctx_->has_hanging_ops_ = true; + ctx_->has_pending_ops_ = true; return true; } - return call_->cq()->Pluck(&ctx_->hanging_ops_); + ctx_->has_pending_ops_ = false; + return call_->cq()->Pluck(&ctx_->pending_ops_); } private: |