diff options
author | dvshkurko <dvshkurko@yandex-team.ru> | 2022-02-10 16:45:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:52 +0300 |
commit | c768a99151e47c3a4bb7b92c514d256abd301c4d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/grpc/src/cpp/common/alarm.cc | |
parent | 321ee9bce31ec6e238be26dbcbe539cffa2c3309 (diff) | |
download | ydb-c768a99151e47c3a4bb7b92c514d256abd301c4d.tar.gz |
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/grpc/src/cpp/common/alarm.cc')
-rw-r--r-- | contrib/libs/grpc/src/cpp/common/alarm.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/libs/grpc/src/cpp/common/alarm.cc b/contrib/libs/grpc/src/cpp/common/alarm.cc index bfbf26ed4d..a2612874b2 100644 --- a/contrib/libs/grpc/src/cpp/common/alarm.cc +++ b/contrib/libs/grpc/src/cpp/common/alarm.cc @@ -42,7 +42,7 @@ class AlarmImpl : public ::grpc::internal::CompletionQueueTag { grpc_timer_init_unset(&timer_); } ~AlarmImpl() {} - bool FinalizeResult(void** tag, bool* /*status*/) override { + bool FinalizeResult(void** tag, bool* /*status*/) override { *tag = tag_; Unref(); return true; @@ -54,23 +54,23 @@ class AlarmImpl : public ::grpc::internal::CompletionQueueTag { cq_ = cq->cq(); tag_ = tag; GPR_ASSERT(grpc_cq_begin_op(cq_, this)); - GRPC_CLOSURE_INIT( - &on_alarm_, - [](void* arg, grpc_error* error) { - // queue the op on the completion queue - AlarmImpl* alarm = static_cast<AlarmImpl*>(arg); - alarm->Ref(); - // Preserve the cq and reset the cq_ so that the alarm - // can be reset when the alarm tag is delivered. - grpc_completion_queue* cq = alarm->cq_; - alarm->cq_ = nullptr; - grpc_cq_end_op( - cq, alarm, error, - [](void* /*arg*/, grpc_cq_completion* /*completion*/) {}, arg, - &alarm->completion_); - GRPC_CQ_INTERNAL_UNREF(cq, "alarm"); - }, - this, grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_INIT( + &on_alarm_, + [](void* arg, grpc_error* error) { + // queue the op on the completion queue + AlarmImpl* alarm = static_cast<AlarmImpl*>(arg); + alarm->Ref(); + // Preserve the cq and reset the cq_ so that the alarm + // can be reset when the alarm tag is delivered. + grpc_completion_queue* cq = alarm->cq_; + alarm->cq_ = nullptr; + grpc_cq_end_op( + cq, alarm, error, + [](void* /*arg*/, grpc_cq_completion* /*completion*/) {}, arg, + &alarm->completion_); + GRPC_CQ_INTERNAL_UNREF(cq, "alarm"); + }, + this, grpc_schedule_on_exec_ctx); grpc_timer_init(&timer_, grpc_timespec_to_millis_round_up(deadline), &on_alarm_); } |