aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-07-18 10:44:22 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-07-18 10:44:22 +0300
commitf6785ed3c55a74e0ae0bf427b980cb9fc8ae7854 (patch)
tree689d8e576f15f54f6235419a9405dabbae9dd44c
parentfb2b4b0c86a25d7b7db05fa8b3d63c45b862aef7 (diff)
downloadydb-f6785ed3c55a74e0ae0bf427b980cb9fc8ae7854.tar.gz
actor instance custom name
-rw-r--r--library/cpp/actors/core/actor.h4
-rw-r--r--library/cpp/actors/core/actor_bootstrapped.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h
index 54ab5a5f3b..d80feb195d 100644
--- a/library/cpp/actors/core/actor.h
+++ b/library/cpp/actors/core/actor.h
@@ -661,6 +661,10 @@ namespace NActors {
: IActorCallback(static_cast<TReceiveFunc>(func), activityEnumType) {
}
+ TActor(void (TDerived::* func)(TAutoPtr<IEventHandle>& ev), const TString& actorName)
+ : IActorCallback(static_cast<TReceiveFunc>(func), TLocalProcessKeyState<TActorActivityTag>::GetInstance().Register(actorName)) {
+ }
+
public:
typedef TDerived TThis;
};
diff --git a/library/cpp/actors/core/actor_bootstrapped.h b/library/cpp/actors/core/actor_bootstrapped.h
index fff1193819..5d3d381d6e 100644
--- a/library/cpp/actors/core/actor_bootstrapped.h
+++ b/library/cpp/actors/core/actor_bootstrapped.h
@@ -40,5 +40,9 @@ namespace NActors {
TActorBootstrapped(const TEnum activityType)
: TActor<TDerived>(&TDerived::StateBootstrap, activityType) {
}
+
+ TActorBootstrapped(const TString& activityName)
+ : TActor<TDerived>(&TDerived::StateBootstrap, activityName) {
+ }
};
}