diff options
author | 2016-05-14 13:05:41 -0700 | |
---|---|---|
committer | 2016-05-14 13:05:41 -0700 | |
commit | f7a670fe6da0538679dab200132b2d15742b4963 (patch) | |
tree | 0d20f1e2f61c6855bd3cea87a88fd2fa3f140c90 /include/grpc++/impl | |
parent | 1ba1bba66a18b6b7986a1cfa52c6f1ac4a14a029 (diff) | |
parent | 088891119f17b827b4f45f09e39411f007618ddf (diff) |
Merge branch 'server_channel_affinity' of github.com:sreecha/grpc into affine
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r-- | include/grpc++/impl/codegen/completion_queue.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 56864d6d53..1b84b44705 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -222,9 +222,18 @@ class CompletionQueue : private GrpcLibraryCodegen { /// A specific type of completion queue used by the processing of notifications /// by servers. Instantiated by \a ServerBuilder. class ServerCompletionQueue : public CompletionQueue { + public: + bool IsFrequentlyPolled() { return is_frequently_polled_; } + private: + bool is_frequently_polled_; friend class ServerBuilder; - ServerCompletionQueue() {} + /// \param is_frequently_polled Informs the GPRC library about whether the + /// server completion queue would be actively polled (by calling Next() or + /// AsyncNext()). By default all server completion queues are assumed to be + /// frequently polled. + ServerCompletionQueue(bool is_frequently_polled = true) + : is_frequently_polled_(is_frequently_polled) {} }; } // namespace grpc |