diff options
author | Vijay Pai <vpai@google.com> | 2015-03-12 05:19:34 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2015-03-12 05:19:34 -0700 |
commit | c41bf3cb5a497ee2a6ab9a9b959587a4e56328ed (patch) | |
tree | c2a1ca6cf725c9ad28c19ed36d64db3c3b72b116 /include/grpc++/completion_queue.h | |
parent | 3e0a46a1c4297b2d8fd0f05162bf551f3bae78b5 (diff) |
More sane ordering of methods
Diffstat (limited to 'include/grpc++/completion_queue.h')
-rw-r--r-- | include/grpc++/completion_queue.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h index ffa53698bb..4181911b58 100644 --- a/include/grpc++/completion_queue.h +++ b/include/grpc++/completion_queue.h @@ -76,20 +76,19 @@ class CompletionQueue { explicit CompletionQueue(grpc_completion_queue *take); ~CompletionQueue(); - // Tri-state return for Next: SHUTDOWN, GOT_EVENT, TIMEOUT + // Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT enum NextStatus {SHUTDOWN, GOT_EVENT, TIMEOUT}; + // Nonblocking (until deadline) read from queue. + // Cannot rely on result of tag or ok if return is TIMEOUT + NextStatus AsyncNext(void **tag, bool *ok, gpr_timespec deadline); + // 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,gpr_inf_future) != SHUTDOWN); } - // Nonblocking (until deadline) read from queue. - // Cannot rely on result of tag or ok if return is TIMEOUT - NextStatus AsyncNext(void **tag, bool *ok, gpr_timespec deadline); - // Shutdown has to be called, and the CompletionQueue can only be // destructed when false is returned from Next(). void Shutdown(); |