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/coroutine/engine | |
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/coroutine/engine')
-rw-r--r-- | library/cpp/coroutine/engine/coroutine_ut.cpp | 28 | ||||
-rw-r--r-- | library/cpp/coroutine/engine/impl.h | 2 | ||||
-rw-r--r-- | library/cpp/coroutine/engine/poller.cpp | 10 | ||||
-rw-r--r-- | library/cpp/coroutine/engine/sockmap.h | 4 | ||||
-rw-r--r-- | library/cpp/coroutine/engine/sockpool.h | 4 |
5 files changed, 24 insertions, 24 deletions
diff --git a/library/cpp/coroutine/engine/coroutine_ut.cpp b/library/cpp/coroutine/engine/coroutine_ut.cpp index 8b372496a2..fcc9a5a641 100644 --- a/library/cpp/coroutine/engine/coroutine_ut.cpp +++ b/library/cpp/coroutine/engine/coroutine_ut.cpp @@ -125,11 +125,11 @@ void TCoroTest::TestException() { UNIT_ASSERT(!unc); } -static int i0; +static int i0; static void CoRun(TCont* c, void* /*run*/) { - while (i0 < 100000) { - ++i0; + while (i0 < 100000) { + ++i0; UNIT_ASSERT(RunningCont() == c); c->Yield(); UNIT_ASSERT(RunningCont() == c); @@ -137,7 +137,7 @@ static void CoRun(TCont* c, void* /*run*/) { } static void CoMain(TCont* c, void* /*arg*/) { - for (volatile size_t i2 = 0; i2 < 10; ++i2) { + for (volatile size_t i2 = 0; i2 < 10; ++i2) { UNIT_ASSERT(RunningCont() == c); c->Executor()->Create(CoRun, nullptr, "run"); UNIT_ASSERT(RunningCont() == c); @@ -192,7 +192,7 @@ public: }; void TCoroTest::TestMemFun() { - i0 = 0; + i0 = 0; TContExecutor e(32000); TTestObject obj; e.Create<TTestObject, &TTestObject::RunTask1>(&obj, "test1"); @@ -203,25 +203,25 @@ void TCoroTest::TestMemFun() { void TCoroTest::TestSimpleX2() { { - i0 = 0; + i0 = 0; { TContExecutor e(32000); e.Execute(CoMain); } - UNIT_ASSERT_EQUAL(i0, 100000); + UNIT_ASSERT_EQUAL(i0, 100000); } { - i0 = 0; + i0 = 0; { TContExecutor e(32000); e.Execute(CoMain); } - UNIT_ASSERT_EQUAL(i0, 100000); + UNIT_ASSERT_EQUAL(i0, 100000); } } @@ -243,7 +243,7 @@ void TCoroTest::TestSimpleX3() { TContExecutor e(32000); TRunner runner; - for (volatile size_t i3 = 0; i3 < 1000; ++i3) { + for (volatile size_t i3 = 0; i3 < 1000; ++i3) { e.Create(runner, "runner"); } @@ -252,7 +252,7 @@ void TCoroTest::TestSimpleX3() { UNIT_ASSERT_EQUAL(runner.Runs, 1000); } -static TString res; +static TString res; static TContMutex mutex; static void CoMutex(TCont* c, void* /*run*/) { @@ -289,7 +289,7 @@ static TContMutex m1; static TContCondVar c1; static void CoCondVar(TCont* c, void* /*run*/) { - for (size_t i4 = 0; i4 < 3; ++i4) { + for (size_t i4 = 0; i4 < 3; ++i4) { UNIT_ASSERT_EQUAL(m1.LockI(c), 0); UNIT_ASSERT_EQUAL(c1.WaitI(c, &m1), 0); res += c->Name(); @@ -311,8 +311,8 @@ static void CoCondVarTest(TCont* c, void* /*run*/) { c->Executor()->Create(CoCondVar, nullptr, "6"); c->Yield(); - for (size_t i5 = 0; i5 < 3; ++i5) { - res += ToString((size_t)i5) + "^"; + for (size_t i5 = 0; i5 < 3; ++i5) { + res += ToString((size_t)i5) + "^"; c1.BroadCast(); c->Yield(); } diff --git a/library/cpp/coroutine/engine/impl.h b/library/cpp/coroutine/engine/impl.h index 283a96ecf1..0abfa5582c 100644 --- a/library/cpp/coroutine/engine/impl.h +++ b/library/cpp/coroutine/engine/impl.h @@ -160,7 +160,7 @@ public: NCoro::ITime* time = nullptr ); - ~TContExecutor(); + ~TContExecutor(); // if we already have a coroutine to run void Execute() noexcept; diff --git a/library/cpp/coroutine/engine/poller.cpp b/library/cpp/coroutine/engine/poller.cpp index 61164fa56b..73398d8e65 100644 --- a/library/cpp/coroutine/engine/poller.cpp +++ b/library/cpp/coroutine/engine/poller.cpp @@ -128,11 +128,11 @@ namespace { } }; - typedef TIntrusiveList<TVal> TListType; + typedef TIntrusiveList<TVal> TListType; public: - typedef typename TListType::TIterator TIterator; - typedef typename TListType::TConstIterator TConstIterator; + typedef typename TListType::TIterator TIterator; + typedef typename TListType::TConstIterator TConstIterator; TIndexedArray() : P_(TMemoryPool::TExpGrow::Instance(), TDefaultAllocator::Instance()) @@ -184,7 +184,7 @@ namespace { using TValRef = THolder<TVal>; typename TVal::TPool P_; TSocketMap<TValRef> V_; - TListType I_; + TListType I_; }; @@ -306,7 +306,7 @@ namespace { private: typedef TIndexedArray<TChange> TFds; TFds S_; - typedef TVector<pollfd> TPollVec; + typedef TVector<pollfd> TPollVec; TPollVec T_; }; diff --git a/library/cpp/coroutine/engine/sockmap.h b/library/cpp/coroutine/engine/sockmap.h index fd189e1774..193ec2261b 100644 --- a/library/cpp/coroutine/engine/sockmap.h +++ b/library/cpp/coroutine/engine/sockmap.h @@ -19,6 +19,6 @@ public: } private: - TVector<T> V_; - THashMap<size_t, T> H_; + TVector<T> V_; + THashMap<size_t, T> H_; }; diff --git a/library/cpp/coroutine/engine/sockpool.h b/library/cpp/coroutine/engine/sockpool.h index 1ebb7e7b38..953f4f600c 100644 --- a/library/cpp/coroutine/engine/sockpool.h +++ b/library/cpp/coroutine/engine/sockpool.h @@ -77,7 +77,7 @@ class TPooledSocket { } private: - inline void ReturnToPool() noexcept; + inline void ReturnToPool() noexcept; private: TSocketPool* Pool_; @@ -222,7 +222,7 @@ private: TMutex Mutex_; }; -inline void TPooledSocket::TImpl::ReturnToPool() noexcept { +inline void TPooledSocket::TImpl::ReturnToPool() noexcept { Pool_->Release(this); } |