aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/grpc/server/event_callback.h
diff options
context:
space:
mode:
authorSergey Polovko <sergey@polovko.me>2022-02-10 16:47:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:02 +0300
commit3e0b762a82514bac89c1dd6ea7211e381d8aa248 (patch)
treec2d1b379ecaf05ca8f11ed0b5da9d1a950e6e554 /library/cpp/grpc/server/event_callback.h
parentab3783171cc30e262243a0227c86118f7080c896 (diff)
downloadydb-3e0b762a82514bac89c1dd6ea7211e381d8aa248.tar.gz
Restoring authorship annotation for Sergey Polovko <sergey@polovko.me>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/grpc/server/event_callback.h')
-rw-r--r--library/cpp/grpc/server/event_callback.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/grpc/server/event_callback.h b/library/cpp/grpc/server/event_callback.h
index d0b700b3c9..13d9bb46b2 100644
--- a/library/cpp/grpc/server/event_callback.h
+++ b/library/cpp/grpc/server/event_callback.h
@@ -2,7 +2,7 @@
#include "grpc_server.h"
-namespace NGrpc {
+namespace NGrpc {
enum class EQueueEventStatus {
OK,
@@ -10,7 +10,7 @@ enum class EQueueEventStatus {
};
template<class TCallback>
-class TQueueEventCallback: public IQueueEvent {
+class TQueueEventCallback: public IQueueEvent {
public:
TQueueEventCallback(const TCallback& callback)
: Callback(callback)
@@ -33,9 +33,9 @@ private:
TCallback Callback;
};
-// Implementation of IQueueEvent that reduces allocations
+// Implementation of IQueueEvent that reduces allocations
template<class TSelf>
-class TQueueFixedEvent: private IQueueEvent {
+class TQueueFixedEvent: private IQueueEvent {
using TCallback = void (TSelf::*)(EQueueEventStatus);
public:
@@ -44,7 +44,7 @@ public:
, Callback(callback)
{ }
- IQueueEvent* Prepare() {
+ IQueueEvent* Prepare() {
Self->Ref();
return this;
}
@@ -65,16 +65,16 @@ private:
};
template<class TCallback>
-inline IQueueEvent* MakeQueueEventCallback(TCallback&& callback) {
+inline IQueueEvent* MakeQueueEventCallback(TCallback&& callback) {
return new TQueueEventCallback<TCallback>(std::forward<TCallback>(callback));
}
template<class T>
-inline IQueueEvent* MakeQueueEventCallback(T* self, void (T::*method)(EQueueEventStatus)) {
+inline IQueueEvent* MakeQueueEventCallback(T* self, void (T::*method)(EQueueEventStatus)) {
using TPtr = TIntrusivePtr<T>;
return MakeQueueEventCallback([self = TPtr(self), method] (EQueueEventStatus status) {
((*self).*method)(status);
});
}
-} // namespace NGrpc
+} // namespace NGrpc