diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/threading/queue/unordered_ut.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/queue/unordered_ut.cpp')
-rw-r--r-- | library/cpp/threading/queue/unordered_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/threading/queue/unordered_ut.cpp b/library/cpp/threading/queue/unordered_ut.cpp index a43b7f520e..494cffcbe5 100644 --- a/library/cpp/threading/queue/unordered_ut.cpp +++ b/library/cpp/threading/queue/unordered_ut.cpp @@ -6,19 +6,19 @@ #include "ut_helpers.h" -template <typename TQueueType> +template <typename TQueueType> class TTestUnorderedQueue: public TTestBase { private: using TLink = TIntrusiveLink; - UNIT_TEST_SUITE_DEMANGLE(TTestUnorderedQueue<TQueueType>); + UNIT_TEST_SUITE_DEMANGLE(TTestUnorderedQueue<TQueueType>); UNIT_TEST(Push1M_Pop1M_Unordered) UNIT_TEST_SUITE_END(); public: void Push1M_Pop1M_Unordered() { constexpr int REPEAT = 1000000; - TQueueType queue; + TQueueType queue; TLink msg[REPEAT]; auto pmsg = queue.Pop(); @@ -28,7 +28,7 @@ public: queue.Push(&msg[i]); } - TVector<TLink*> popped; + TVector<TLink*> popped; popped.reserve(REPEAT); for (int i = 0; i < REPEAT; ++i) { popped.push_back((TLink*)queue.Pop()); @@ -44,17 +44,17 @@ public: } }; -template <typename TQueueType> +template <typename TQueueType> class TTestWeakQueue: public TTestBase { private: - UNIT_TEST_SUITE_DEMANGLE(TTestWeakQueue<TQueueType>); + UNIT_TEST_SUITE_DEMANGLE(TTestWeakQueue<TQueueType>); UNIT_TEST(Threads8_Rnd_Exchange) UNIT_TEST_SUITE_END(); public: template <ui16 COUNT = 48, ui32 MSG_COUNT = 10000> void ManyThreadsRndExchange() { - TQueueType queues[COUNT]; + TQueueType queues[COUNT]; class TWorker: public ISimpleThread { public: @@ -68,9 +68,9 @@ public: { } - TQueueType* Queues; + TQueueType* Queues; ui16 MineQueue; - TVector<uintptr_t> Received; + TVector<uintptr_t> Received; TAtomic* PushDone; void* ThreadProc() override { @@ -120,7 +120,7 @@ public: } }; - TVector<TAutoPtr<TWorker>> workers; + TVector<TAutoPtr<TWorker>> workers; TAtomic pushDone = 0; for (ui32 i = 0; i < COUNT; ++i) { @@ -128,7 +128,7 @@ public: workers.back()->Start(); } - TVector<uintptr_t> all; + TVector<uintptr_t> all; for (ui32 i = 0; i < COUNT; ++i) { workers[i]->Join(); all.insert(all.begin(), |