summaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/actor
diff options
context:
space:
mode:
authorilnurkh <[email protected]>2023-10-09 23:39:40 +0300
committerilnurkh <[email protected]>2023-10-09 23:57:14 +0300
commite601ca03f859335d57ecff2e5aa6af234b6052ed (patch)
treede519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/messagebus/actor
parentbbf2b6878af3854815a2c0ecb07a687071787639 (diff)
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/messagebus/actor')
-rw-r--r--library/cpp/messagebus/actor/actor.h4
-rw-r--r--library/cpp/messagebus/actor/executor.cpp6
-rw-r--r--library/cpp/messagebus/actor/queue_for_actor.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/messagebus/actor/actor.h b/library/cpp/messagebus/actor/actor.h
index 9b8f20298a2..a7e706cf214 100644
--- a/library/cpp/messagebus/actor/actor.h
+++ b/library/cpp/messagebus/actor/actor.h
@@ -82,14 +82,14 @@ namespace NActor {
void ScheduleHereAtMostOnce() {
if (Tasks.AddTask()) {
bool fetched = Tasks.FetchTask();
- Y_VERIFY(fetched, "happens");
+ Y_ABORT_UNLESS(fetched, "happens");
DoAct();
// if someone added more tasks, schedule them
if (Tasks.FetchTask()) {
bool added = Tasks.AddTask();
- Y_VERIFY(!added, "happens");
+ Y_ABORT_UNLESS(!added, "happens");
EnqueueWork();
}
}
diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp
index 0c095b16778..70233799e3c 100644
--- a/library/cpp/messagebus/actor/executor.cpp
+++ b/library/cpp/messagebus/actor/executor.cpp
@@ -178,7 +178,7 @@ void TExecutor::Init() {
AtomicSet(ExitWorkers, 0);
- Y_VERIFY(Config.WorkerCount > 0);
+ Y_ABORT_UNLESS(Config.WorkerCount > 0);
for (size_t i = 0; i < Config.WorkerCount; i++) {
WorkerThreads.push_back(new TExecutorWorker(this));
@@ -215,7 +215,7 @@ void TExecutor::EnqueueWork(TArrayRef<IWorkItem* const> wis) {
return;
if (Y_UNLIKELY(AtomicGet(ExitWorkers) != 0)) {
- Y_VERIFY(WorkItems.Empty(), "executor %s: cannot add tasks after queue shutdown", Config.Name);
+ Y_ABORT_UNLESS(WorkItems.Empty(), "executor %s: cannot add tasks after queue shutdown", Config.Name);
}
TWhatThreadDoesPushPop pp("executor: EnqueueWork");
@@ -319,7 +319,7 @@ void TExecutor::ProcessWorkQueueHere() {
}
void TExecutor::RunWorker() {
- Y_VERIFY(!ThreadCurrentExecutor, "state check");
+ Y_ABORT_UNLESS(!ThreadCurrentExecutor, "state check");
ThreadCurrentExecutor = this;
SetCurrentThreadName("wrkr");
diff --git a/library/cpp/messagebus/actor/queue_for_actor.h b/library/cpp/messagebus/actor/queue_for_actor.h
index 40fa536b825..99d0d4c89e8 100644
--- a/library/cpp/messagebus/actor/queue_for_actor.h
+++ b/library/cpp/messagebus/actor/queue_for_actor.h
@@ -21,7 +21,7 @@ namespace NActor {
public:
~TQueueForActor() {
- Y_VERIFY(Queue.IsEmpty());
+ Y_ABORT_UNLESS(Queue.IsEmpty());
}
bool IsEmpty() {