aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/helpers
diff options
context:
space:
mode:
authorAndrey Fomichev <andrey.fomichev@gmail.com>2022-02-10 16:49:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:15 +0300
commit1c61afbf3db63940d05e6fefa3104b03457788a1 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/actors/helpers
parente542cc14db4240643a06bb0dde87ecf361f101ab (diff)
downloadydb-1c61afbf3db63940d05e6fefa3104b03457788a1.tar.gz
Restoring authorship annotation for Andrey Fomichev <andrey.fomichev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/helpers')
-rw-r--r--library/cpp/actors/helpers/activeactors.cpp4
-rw-r--r--library/cpp/actors/helpers/activeactors.h64
-rw-r--r--library/cpp/actors/helpers/ya.make4
3 files changed, 36 insertions, 36 deletions
diff --git a/library/cpp/actors/helpers/activeactors.cpp b/library/cpp/actors/helpers/activeactors.cpp
index c49c37b230a..145e97dc572 100644
--- a/library/cpp/actors/helpers/activeactors.cpp
+++ b/library/cpp/actors/helpers/activeactors.cpp
@@ -1,2 +1,2 @@
-#include "activeactors.h"
-
+#include "activeactors.h"
+
diff --git a/library/cpp/actors/helpers/activeactors.h b/library/cpp/actors/helpers/activeactors.h
index 43ad640dd64..0fdb0fab108 100644
--- a/library/cpp/actors/helpers/activeactors.h
+++ b/library/cpp/actors/helpers/activeactors.h
@@ -2,41 +2,41 @@
#include <library/cpp/actors/core/actor.h>
#include <library/cpp/actors/core/events.h>
-#include <util/generic/hash_set.h>
+#include <util/generic/hash_set.h>
-namespace NActors {
+namespace NActors {
- ////////////////////////////////////////////////////////////////////////////
- // TActiveActors
- // This class helps manage created actors and kill them all on PoisonPill.
- ////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////
+ // TActiveActors
+ // This class helps manage created actors and kill them all on PoisonPill.
+ ////////////////////////////////////////////////////////////////////////////
class TActiveActors : public THashSet<TActorId> {
- public:
+ public:
void Insert(const TActorId &aid) {
- bool inserted = insert(aid).second;
- Y_VERIFY(inserted);
- }
-
- void Insert(const TActiveActors &moreActors) {
- for (const auto &aid : moreActors) {
- Insert(aid);
- }
- }
-
+ bool inserted = insert(aid).second;
+ Y_VERIFY(inserted);
+ }
+
+ void Insert(const TActiveActors &moreActors) {
+ for (const auto &aid : moreActors) {
+ Insert(aid);
+ }
+ }
+
void Erase(const TActorId &aid) {
- auto num = erase(aid);
- Y_VERIFY(num == 1);
- }
-
- size_t KillAndClear(const TActorContext &ctx) {
- size_t s = size(); // number of actors managed
- for (const auto &x: *this) {
- ctx.Send(x, new TEvents::TEvPoisonPill());
- }
- clear();
- return s; // how many actors we killed
- }
- };
-
+ auto num = erase(aid);
+ Y_VERIFY(num == 1);
+ }
+
+ size_t KillAndClear(const TActorContext &ctx) {
+ size_t s = size(); // number of actors managed
+ for (const auto &x: *this) {
+ ctx.Send(x, new TEvents::TEvPoisonPill());
+ }
+ clear();
+ return s; // how many actors we killed
+ }
+ };
+
} // NKikimr
-
+
diff --git a/library/cpp/actors/helpers/ya.make b/library/cpp/actors/helpers/ya.make
index 2c31d5190a0..d8771179de8 100644
--- a/library/cpp/actors/helpers/ya.make
+++ b/library/cpp/actors/helpers/ya.make
@@ -3,8 +3,8 @@ LIBRARY()
OWNER(g:kikimr)
SRCS(
- activeactors.cpp
- activeactors.h
+ activeactors.cpp
+ activeactors.h
flow_controlled_queue.cpp
flow_controlled_queue.h
future_callback.h