diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/messagebus/actor | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/actor')
-rw-r--r-- | library/cpp/messagebus/actor/actor_ut.cpp | 10 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/executor.cpp | 6 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/ring_buffer.h | 12 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/ring_buffer_ut.cpp | 4 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/tasks_ut.cpp | 6 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/temp_tls_vector.h | 2 | ||||
-rw-r--r-- | library/cpp/messagebus/actor/what_thread_does_guard_ut.cpp | 4 |
7 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/messagebus/actor/actor_ut.cpp b/library/cpp/messagebus/actor/actor_ut.cpp index 6d46c03a05..b76ab55bfa 100644 --- a/library/cpp/messagebus/actor/actor_ut.cpp +++ b/library/cpp/messagebus/actor/actor_ut.cpp @@ -92,8 +92,8 @@ struct TObjectCountChecker { } }; -Y_UNIT_TEST_SUITE(TActor) { - Y_UNIT_TEST(Simple) { +Y_UNIT_TEST_SUITE(TActor) { + Y_UNIT_TEST(Simple) { TObjectCountChecker objectCountChecker; TExecutor executor(4); @@ -105,7 +105,7 @@ Y_UNIT_TEST_SUITE(TActor) { actor->Acted.WaitFor(1u); } - Y_UNIT_TEST(ScheduleAfterStart) { + Y_UNIT_TEST(ScheduleAfterStart) { TObjectCountChecker objectCountChecker; TExecutor executor(4); @@ -147,11 +147,11 @@ Y_UNIT_TEST_SUITE(TActor) { } } - Y_UNIT_TEST(ComplexContention) { + Y_UNIT_TEST(ComplexContention) { ComplexImpl(4, 6); } - Y_UNIT_TEST(ComplexNoContention) { + Y_UNIT_TEST(ComplexNoContention) { ComplexImpl(6, 4); } } diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp index 925e8e5388..7a2227a458 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_VERIFY(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_VERIFY(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_VERIFY(!ThreadCurrentExecutor, "state check"); ThreadCurrentExecutor = this; SetCurrentThreadName("wrkr"); diff --git a/library/cpp/messagebus/actor/ring_buffer.h b/library/cpp/messagebus/actor/ring_buffer.h index 0cf401bfda..ec5706f7c7 100644 --- a/library/cpp/messagebus/actor/ring_buffer.h +++ b/library/cpp/messagebus/actor/ring_buffer.h @@ -17,12 +17,12 @@ private: TVector<T> Data; void StateCheck() const { - Y_ASSERT(Capacity == Data.size()); - Y_ASSERT(Capacity == (1u << CapacityPow)); - Y_ASSERT((Capacity & CapacityMask) == 0u); - Y_ASSERT(Capacity - CapacityMask == 1u); - Y_ASSERT(WritePos < Capacity); - Y_ASSERT(ReadPos < Capacity); + Y_ASSERT(Capacity == Data.size()); + Y_ASSERT(Capacity == (1u << CapacityPow)); + Y_ASSERT((Capacity & CapacityMask) == 0u); + Y_ASSERT(Capacity - CapacityMask == 1u); + Y_ASSERT(WritePos < Capacity); + Y_ASSERT(ReadPos < Capacity); } size_t Writable() const { diff --git a/library/cpp/messagebus/actor/ring_buffer_ut.cpp b/library/cpp/messagebus/actor/ring_buffer_ut.cpp index 2accea357c..bdb379b3a9 100644 --- a/library/cpp/messagebus/actor/ring_buffer_ut.cpp +++ b/library/cpp/messagebus/actor/ring_buffer_ut.cpp @@ -4,7 +4,7 @@ #include <util/random/random.h> -Y_UNIT_TEST_SUITE(RingBuffer) { +Y_UNIT_TEST_SUITE(RingBuffer) { struct TRingBufferTester { TRingBuffer<unsigned> RingBuffer; @@ -52,7 +52,7 @@ Y_UNIT_TEST_SUITE(RingBuffer) { } } - Y_UNIT_TEST(Random) { + Y_UNIT_TEST(Random) { for (unsigned i = 0; i < 100; ++i) { Iter(); } diff --git a/library/cpp/messagebus/actor/tasks_ut.cpp b/library/cpp/messagebus/actor/tasks_ut.cpp index 270392330f..d80e8451a5 100644 --- a/library/cpp/messagebus/actor/tasks_ut.cpp +++ b/library/cpp/messagebus/actor/tasks_ut.cpp @@ -4,8 +4,8 @@ using namespace NActor; -Y_UNIT_TEST_SUITE(TTasks) { - Y_UNIT_TEST(AddTask_FetchTask_Simple) { +Y_UNIT_TEST_SUITE(TTasks) { + Y_UNIT_TEST(AddTask_FetchTask_Simple) { TTasks tasks; UNIT_ASSERT(tasks.AddTask()); @@ -18,7 +18,7 @@ Y_UNIT_TEST_SUITE(TTasks) { UNIT_ASSERT(tasks.AddTask()); } - Y_UNIT_TEST(AddTask_FetchTask_AddTask) { + Y_UNIT_TEST(AddTask_FetchTask_AddTask) { TTasks tasks; UNIT_ASSERT(tasks.AddTask()); diff --git a/library/cpp/messagebus/actor/temp_tls_vector.h b/library/cpp/messagebus/actor/temp_tls_vector.h index 02d7bf8c76..675d92f5b0 100644 --- a/library/cpp/messagebus/actor/temp_tls_vector.h +++ b/library/cpp/messagebus/actor/temp_tls_vector.h @@ -19,7 +19,7 @@ public: TTempTlsVector() { Vector = FastTlsSingletonWithTag<TVectorType<T, std::allocator<T>>, TTagForTls>(); - Y_ASSERT(Vector->empty()); + Y_ASSERT(Vector->empty()); } ~TTempTlsVector() { diff --git a/library/cpp/messagebus/actor/what_thread_does_guard_ut.cpp b/library/cpp/messagebus/actor/what_thread_does_guard_ut.cpp index 96ddeb0f08..e4b218a7ca 100644 --- a/library/cpp/messagebus/actor/what_thread_does_guard_ut.cpp +++ b/library/cpp/messagebus/actor/what_thread_does_guard_ut.cpp @@ -4,8 +4,8 @@ #include <util/system/mutex.h> -Y_UNIT_TEST_SUITE(WhatThreadDoesGuard) { - Y_UNIT_TEST(Simple) { +Y_UNIT_TEST_SUITE(WhatThreadDoesGuard) { + Y_UNIT_TEST(Simple) { TMutex mutex; TWhatThreadDoesAcquireGuard<TMutex> guard(mutex, "acquiring my mutex"); |