aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorazevaykin <azevaykin@yandex-team.com>2023-10-20 14:33:00 +0300
committerazevaykin <azevaykin@yandex-team.com>2023-10-20 15:26:28 +0300
commit94b737e71f7f210914d394f192c49897c80e527d (patch)
tree8f4f37c61f868696791eb8754ccd5e23f022da8b /library/cpp
parentcb95924ef1721b430e56c39da77c6d3ed4db5b40 (diff)
downloadydb-94b737e71f7f210914d394f192c49897c80e527d.tar.gz
Remove 'runtime' from TEventObserver
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp7
-rw-r--r--library/cpp/actors/testlib/test_runtime.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 20b26c33d3..79de25e77f 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -578,8 +578,7 @@ namespace NActors {
return UseRealThreads;
}
- TTestActorRuntimeBase::EEventAction TTestActorRuntimeBase::DefaultObserverFunc(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event) {
- Y_UNUSED(runtime);
+ TTestActorRuntimeBase::EEventAction TTestActorRuntimeBase::DefaultObserverFunc(TAutoPtr<IEventHandle>& event) {
Y_UNUSED(event);
return EEventAction::PROCESS;
}
@@ -1204,7 +1203,7 @@ namespace NActors {
mbox.second->Capture(events);
for (auto& ev : events) {
TInverseGuard<TMutex> inverseGuard(Mutex);
- ObserverFunc(*this, ev);
+ ObserverFunc(ev);
}
mbox.second->PushFront(events);
}
@@ -1232,7 +1231,7 @@ namespace NActors {
EEventAction action;
{
TInverseGuard<TMutex> inverseGuard(Mutex);
- action = ObserverFunc(*this, ev);
+ action = ObserverFunc(ev);
}
switch (action) {
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 80853e357c..18395279d0 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -217,7 +217,7 @@ namespace NActors {
RESCHEDULE
};
- typedef std::function<EEventAction(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event)> TEventObserver;
+ typedef std::function<EEventAction(TAutoPtr<IEventHandle>& event)> TEventObserver;
typedef std::function<void(TTestActorRuntimeBase& runtime, TScheduledEventsList& scheduledEvents, TEventsList& queue)> TScheduledEventsSelector;
typedef std::function<bool(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event)> TEventFilter;
typedef std::function<bool(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event, TDuration delay, TInstant& deadline)> TScheduledEventFilter;
@@ -230,7 +230,7 @@ namespace NActors {
TTestActorRuntimeBase(ui32 nodeCount = 1, bool useRealThreads = false);
virtual ~TTestActorRuntimeBase();
bool IsRealThreads() const;
- static EEventAction DefaultObserverFunc(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event);
+ static EEventAction DefaultObserverFunc(TAutoPtr<IEventHandle>& event);
static void DroppingScheduledEventsSelector(TTestActorRuntimeBase& runtime, TScheduledEventsList& scheduledEvents, TEventsList& queue);
static void CollapsedTimeScheduledEventsSelector(TTestActorRuntimeBase& runtime, TScheduledEventsList& scheduledEvents, TEventsList& queue);
static bool DefaultFilterFunc(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event);