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/queue_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/queue_ut.cpp')
-rw-r--r-- | library/cpp/threading/queue/queue_ut.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/threading/queue/queue_ut.cpp b/library/cpp/threading/queue/queue_ut.cpp index 80eca147da..299025adcc 100644 --- a/library/cpp/threading/queue/queue_ut.cpp +++ b/library/cpp/threading/queue/queue_ut.cpp @@ -5,10 +5,10 @@ typedef void* TMsgLink; -template <typename TQueueType> +template <typename TQueueType> class TQueueTestProcs: public TTestBase { private: - UNIT_TEST_SUITE_DEMANGLE(TQueueTestProcs<TQueueType>); + UNIT_TEST_SUITE_DEMANGLE(TQueueTestProcs<TQueueType>); UNIT_TEST(Threads2_Push1M_Threads1_Pop2M) UNIT_TEST(Threads4_Push1M_Threads1_Pop4M) UNIT_TEST(Threads8_RndPush100K_Threads8_Queues) @@ -21,7 +21,7 @@ private: public: void Push1M_Pop1M() { - TQueueType queue; + TQueueType queue; TMsgLink msg = &queue; auto pmsg = queue.Pop(); @@ -41,17 +41,17 @@ public: } void Threads2_Push1M_Threads1_Pop2M() { - TQueueType queue; + TQueueType queue; class TPusherThread: public ISimpleThread { public: - TPusherThread(TQueueType& theQueue, char* start) - : Queue(theQueue) + TPusherThread(TQueueType& theQueue, char* start) + : Queue(theQueue) , Arg(start) { } - TQueueType& Queue; + TQueueType& Queue; char* Arg; void* ThreadProc() override { @@ -79,17 +79,17 @@ public: } void Threads4_Push1M_Threads1_Pop4M() { - TQueueType queue; + TQueueType queue; class TPusherThread: public ISimpleThread { public: - TPusherThread(TQueueType& theQueue, char* start) - : Queue(theQueue) + TPusherThread(TQueueType& theQueue, char* start) + : Queue(theQueue) , Arg(start) { } - TQueueType& Queue; + TQueueType& Queue; char* Arg; void* ThreadProc() override { @@ -122,17 +122,17 @@ public: template <size_t NUMBER_OF_PUSHERS, size_t NUMBER_OF_QUEUES> void ManyRndPush100K_ManyQueues() { - TQueueType queue[NUMBER_OF_QUEUES]; + TQueueType queue[NUMBER_OF_QUEUES]; class TPusherThread: public ISimpleThread { public: - TPusherThread(TQueueType* queues, char* start) + TPusherThread(TQueueType* queues, char* start) : Queues(queues) , Arg(start) { } - TQueueType* Queues; + TQueueType* Queues; char* Arg; void* ThreadProc() override { @@ -157,13 +157,13 @@ public: class TPopperThread: public ISimpleThread { public: - TPopperThread(TQueueType* theQueue, char* base) - : Queue(theQueue) + TPopperThread(TQueueType* theQueue, char* base) + : Queue(theQueue) , Base(base) { } - TQueueType* Queue; + TQueueType* Queue; char* Base; void* ThreadProc() override { @@ -197,8 +197,8 @@ public: } }; - TVector<TAutoPtr<TPopperThread>> poppers; - TVector<TAutoPtr<TPusherThread>> pushers; + TVector<TAutoPtr<TPopperThread>> poppers; + TVector<TAutoPtr<TPusherThread>> pushers; for (size_t i = 0; i < NUMBER_OF_QUEUES; ++i) { poppers.emplace_back(new TPopperThread(&queue[i], (char*)&queue)); |