diff options
author | elviandante <elviandante@yandex-team.ru> | 2022-02-10 16:49:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:47 +0300 |
commit | 621a17b75565a8d70df465a0ac5c93a7c6d2e61f (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/coroutine | |
parent | 643ddee8bd6125a18c4b1506c35bee857f64f4d2 (diff) | |
download | ydb-621a17b75565a8d70df465a0ac5c93a7c6d2e61f.tar.gz |
Restoring authorship annotation for <elviandante@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/coroutine')
-rw-r--r-- | library/cpp/coroutine/engine/coroutine_ut.cpp | 22 | ||||
-rw-r--r-- | library/cpp/coroutine/engine/impl.h | 10 |
2 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/coroutine/engine/coroutine_ut.cpp b/library/cpp/coroutine/engine/coroutine_ut.cpp index 0c183a14f4..8b372496a2 100644 --- a/library/cpp/coroutine/engine/coroutine_ut.cpp +++ b/library/cpp/coroutine/engine/coroutine_ut.cpp @@ -189,18 +189,18 @@ public: void RunTask2(TCont*) { j = 2; } -}; - -void TCoroTest::TestMemFun() { +}; + +void TCoroTest::TestMemFun() { i0 = 0; - TContExecutor e(32000); - TTestObject obj; - e.Create<TTestObject, &TTestObject::RunTask1>(&obj, "test1"); - e.Execute<TTestObject, &TTestObject::RunTask2>(&obj); - UNIT_ASSERT_EQUAL(obj.i, 1); - UNIT_ASSERT_EQUAL(obj.j, 2); -} - + TContExecutor e(32000); + TTestObject obj; + e.Create<TTestObject, &TTestObject::RunTask1>(&obj, "test1"); + e.Execute<TTestObject, &TTestObject::RunTask2>(&obj); + UNIT_ASSERT_EQUAL(obj.i, 1); + UNIT_ASSERT_EQUAL(obj.j, 2); +} + void TCoroTest::TestSimpleX2() { { i0 = 0; diff --git a/library/cpp/coroutine/engine/impl.h b/library/cpp/coroutine/engine/impl.h index 47fd23a944..283a96ecf1 100644 --- a/library/cpp/coroutine/engine/impl.h +++ b/library/cpp/coroutine/engine/impl.h @@ -130,10 +130,10 @@ static void ContHelperFunc(TCont* cont, void* arg) { } template <typename T, void (T::*M)(TCont*)> -static void ContHelperMemberFunc(TCont* c, void* arg) { +static void ContHelperMemberFunc(TCont* c, void* arg) { ((reinterpret_cast<T*>(arg))->*M)(c); -} - +} + class IUserEvent : public TIntrusiveListItem<IUserEvent> { @@ -176,7 +176,7 @@ public: void Execute(T* obj) noexcept { Execute(ContHelperMemberFunc<T, M>, obj); } - + template <class Functor> TCont* Create( Functor& f, @@ -194,7 +194,7 @@ public: ) noexcept { return Create(ContHelperMemberFunc<T, M>, obj, name, customStackSize); } - + TCont* Create( TContFunc func, void* arg, |