diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/messagebus/actor | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 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 b76ab55bfa..6d46c03a05 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 7a2227a458..925e8e5388 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 ec5706f7c7..0cf401bfda 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 bdb379b3a9..2accea357c 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 d80e8451a5..270392330f 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 675d92f5b0..02d7bf8c76 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 e4b218a7ca..96ddeb0f08 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"); |