Merge pull request #21378 from vjpai/deexperimentalize_alarm

De-experimentalize callback alarm
reviewable/pr21215/r6
Vijay Pai 5 years ago committed by GitHub
commit c5b9828592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      include/grpcpp/alarm_impl.h

@ -77,6 +77,17 @@ class Alarm : private ::grpc::GrpcLibraryCodegen {
/// has already fired has no effect.
void Cancel();
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
/// Set an alarm to invoke callback \a f. The argument to the callback
/// states whether the alarm expired at \a deadline (true) or was cancelled
/// (false)
template <typename T>
void Set(const T& deadline, std::function<void(bool)> f) {
alarm_->SetInternal(::grpc::TimePoint<T>(deadline).raw_time(),
std::move(f));
}
#endif
/// NOTE: class experimental_type is not part of the public API of this class
/// TODO(vjpai): Move these contents to the public API of Alarm when
/// they are no longer experimental

Loading…
Cancel
Save