summaryrefslogtreecommitdiff
path: root/grpc/include/grpcpp/alarm.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/include/grpcpp/alarm.h')
-rw-r--r--grpc/include/grpcpp/alarm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/grpc/include/grpcpp/alarm.h b/grpc/include/grpcpp/alarm.h
index 1405590c..6723e136 100644
--- a/grpc/include/grpcpp/alarm.h
+++ b/grpc/include/grpcpp/alarm.h
@@ -56,6 +56,10 @@ class Alarm : private ::grpc::GrpcLibraryCodegen {
/// Once the alarm expires (at \a deadline) or it's cancelled (see \a Cancel),
/// an event with tag \a tag will be added to \a cq. If the alarm expired, the
/// event's success bit will be true, false otherwise (ie, upon cancellation).
+ //
+ // USAGE NOTE: This is frequently used to inject arbitrary tags into \a cq by
+ // setting an immediate deadline. Such usage allows synchronizing an external
+ // event with an application's \a grpc::CompletionQueue::Next loop.
template <typename T>
void Set(::grpc::CompletionQueue* cq, const T& deadline, void* tag) {
SetInternal(cq, ::grpc::TimePoint<T>(deadline).raw_time(), tag);