resolve merge error

pull/1066/head
Yang Gao 10 years ago
parent 1fc046902c
commit 050e37aab8
  1. 90
      include/grpc++/completion_queue.h

@ -86,53 +86,51 @@ class CompletionQueue {
// Blocking (until deadline) read from queue. // Blocking (until deadline) read from queue.
// Returns false if the queue is ready for destruction, true if event // Returns false if the queue is ready for destruction, true if event
bool Next(void** tag, bool* ok) { bool Next(void** tag, bool* ok) {
return (AsyncNext(tag, ok, std::chrono::system_clock::time_point::max()) != return (
SHUTDOWN); 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 has to be called, and the CompletionQueue can only be
SHUTDOWN); // destructed when false is returned from Next().
} void Shutdown();
// Shutdown has to be called, and the CompletionQueue can only be grpc_completion_queue* cq() { return cq_; }
// destructed when false is returned from Next().
void Shutdown(); private:
// Friend synchronous wrappers so that they can access Pluck(), which is
grpc_completion_queue* cq() { return cq_; } // a semi-private API geared towards the synchronous implementation.
template <class R>
private: friend class ::grpc::ClientReader;
// Friend synchronous wrappers so that they can access Pluck(), which is template <class W>
// a semi-private API geared towards the synchronous implementation. friend class ::grpc::ClientWriter;
template <class R> template <class R, class W>
friend class ::grpc::ClientReader; friend class ::grpc::ClientReaderWriter;
template <class W> template <class R>
friend class ::grpc::ClientWriter; friend class ::grpc::ServerReader;
template <class R, class W> template <class W>
friend class ::grpc::ClientReaderWriter; friend class ::grpc::ServerWriter;
template <class R> template <class R, class W>
friend class ::grpc::ServerReader; friend class ::grpc::ServerReaderWriter;
template <class W> friend class ::grpc::Server;
friend class ::grpc::ServerWriter; friend class ::grpc::ServerContext;
template <class R, class W> friend Status BlockingUnaryCall(ChannelInterface* channel,
friend class ::grpc::ServerReaderWriter; const RpcMethod& method,
friend class ::grpc::Server; ClientContext* context,
friend class ::grpc::ServerContext; const grpc::protobuf::Message& request,
friend Status BlockingUnaryCall( grpc::protobuf::Message* result);
ChannelInterface * channel, const RpcMethod& method,
ClientContext* context, const grpc::protobuf::Message& request, // Wraps grpc_completion_queue_pluck.
grpc::protobuf::Message* result); // Cannot be mixed with calls to Next().
bool Pluck(CompletionQueueTag* tag);
// Wraps grpc_completion_queue_pluck.
// Cannot be mixed with calls to Next(). // Does a single polling pluck on tag
bool Pluck(CompletionQueueTag * tag); void TryPluck(CompletionQueueTag* tag);
// Does a single polling pluck on tag grpc_completion_queue* cq_; // owned
void TryPluck(CompletionQueueTag * tag); };
grpc_completion_queue* cq_; // owned
};
} // namespace grpc } // namespace grpc

Loading…
Cancel
Save