aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/completion_queue.h
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-03-19 07:27:28 -0700
committerGravatar Yang Gao <yangg@google.com>2015-03-19 07:27:28 -0700
commit050e37aab8b20b5832b7c8d6226c3b2000562455 (patch)
tree5eb4ccefe3f42a63af6cbe7c6de1e0eab7af14db /include/grpc++/completion_queue.h
parent1fc046902c9885e33b0044496d1e2b80838340f9 (diff)
resolve merge error
Diffstat (limited to 'include/grpc++/completion_queue.h')
-rw-r--r--include/grpc++/completion_queue.h90
1 files changed, 44 insertions, 46 deletions
diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h
index cb4ce50e93..f4619a1060 100644
--- a/include/grpc++/completion_queue.h
+++ b/include/grpc++/completion_queue.h
@@ -86,53 +86,51 @@ class CompletionQueue {
// Blocking (until deadline) read from queue.
// Returns false if the queue is ready for destruction, true if event
+
bool Next(void** tag, bool* ok) {
- return (AsyncNext(tag, ok, std::chrono::system_clock::time_point::max()) !=
- SHUTDOWN);
-
- bool Next(void** tag, bool* ok) {
- return (
- AsyncNext(tag, ok, (std::chrono::system_clock::time_point::max)()) !=
- SHUTDOWN);
- }
-
- // Shutdown has to be called, and the CompletionQueue can only be
- // destructed when false is returned from Next().
- void Shutdown();
-
- grpc_completion_queue* cq() { return cq_; }
-
- private:
- // Friend synchronous wrappers so that they can access Pluck(), which is
- // a semi-private API geared towards the synchronous implementation.
- template <class R>
- friend class ::grpc::ClientReader;
- template <class W>
- friend class ::grpc::ClientWriter;
- template <class R, class W>
- friend class ::grpc::ClientReaderWriter;
- template <class R>
- friend class ::grpc::ServerReader;
- template <class W>
- friend class ::grpc::ServerWriter;
- template <class R, class W>
- friend class ::grpc::ServerReaderWriter;
- friend class ::grpc::Server;
- friend class ::grpc::ServerContext;
- friend Status BlockingUnaryCall(
- ChannelInterface * channel, const RpcMethod& method,
- ClientContext* context, const grpc::protobuf::Message& request,
- grpc::protobuf::Message* result);
-
- // Wraps grpc_completion_queue_pluck.
- // Cannot be mixed with calls to Next().
- bool Pluck(CompletionQueueTag * tag);
-
- // Does a single polling pluck on tag
- void TryPluck(CompletionQueueTag * tag);
-
- grpc_completion_queue* cq_; // owned
- };
+ return (
+ AsyncNext(tag, ok, (std::chrono::system_clock::time_point::max)()) !=
+ SHUTDOWN);
+ }
+
+ // Shutdown has to be called, and the CompletionQueue can only be
+ // destructed when false is returned from Next().
+ void Shutdown();
+
+ grpc_completion_queue* cq() { return cq_; }
+
+ private:
+ // Friend synchronous wrappers so that they can access Pluck(), which is
+ // a semi-private API geared towards the synchronous implementation.
+ template <class R>
+ friend class ::grpc::ClientReader;
+ template <class W>
+ friend class ::grpc::ClientWriter;
+ template <class R, class W>
+ friend class ::grpc::ClientReaderWriter;
+ template <class R>
+ friend class ::grpc::ServerReader;
+ template <class W>
+ friend class ::grpc::ServerWriter;
+ template <class R, class W>
+ friend class ::grpc::ServerReaderWriter;
+ friend class ::grpc::Server;
+ friend class ::grpc::ServerContext;
+ friend Status BlockingUnaryCall(ChannelInterface* channel,
+ const RpcMethod& method,
+ ClientContext* context,
+ const grpc::protobuf::Message& request,
+ grpc::protobuf::Message* result);
+
+ // Wraps grpc_completion_queue_pluck.
+ // Cannot be mixed with calls to Next().
+ bool Pluck(CompletionQueueTag* tag);
+
+ // Does a single polling pluck on tag
+ void TryPluck(CompletionQueueTag* tag);
+
+ grpc_completion_queue* cq_; // owned
+};
} // namespace grpc