diff options
| author | tobo <[email protected]> | 2026-01-29 19:19:17 +0300 |
|---|---|---|
| committer | tobo <[email protected]> | 2026-01-29 19:43:54 +0300 |
| commit | ae6547ef7935f56cdc7d9adaabfcf125e06e471a (patch) | |
| tree | 6253b976f0ccb3d647a9062d7f223bcc73bf64ea /library/cpp/coroutine | |
| parent | 4922622314ecf0d543b15f72a2b2d6a8423a7eca (diff) | |
TAtomic => std::atomic in library/cpp/coroutine/engine
commit_hash:dec1324c908f86e371bfda82e5cb1d90f06a9d06
Diffstat (limited to 'library/cpp/coroutine')
| -rw-r--r-- | library/cpp/coroutine/engine/coroutine_ut.cpp | 9 | ||||
| -rw-r--r-- | library/cpp/coroutine/engine/ya.make | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/coroutine/engine/coroutine_ut.cpp b/library/cpp/coroutine/engine/coroutine_ut.cpp index 656e3943c05..20176fdb91f 100644 --- a/library/cpp/coroutine/engine/coroutine_ut.cpp +++ b/library/cpp/coroutine/engine/coroutine_ut.cpp @@ -2,7 +2,6 @@ #include "condvar.h" #include "network.h" -#include <library/cpp/deprecated/atomic/atomic.h> #include <library/cpp/testing/unittest/registar.h> #include <util/string/cast.h> @@ -13,6 +12,8 @@ #include <util/generic/xrange.h> #include <util/generic/serialized_enum.h> +#include <atomic> + // TODO (velavokr): BALANCER-1345 add more tests on pollers class TCoroTest: public TTestBase { @@ -162,11 +163,11 @@ void TCoroTest::TestSimpleX1() { void TCoroTest::TestSimpleX1MultiThread() { TVector<THolder<TThread>> threads; const size_t nThreads = 0; - TAtomic c = 0; + std::atomic<size_t> c = 0; for (size_t i = 0; i < nThreads; ++i) { threads.push_back(MakeHolder<TThread>([&]() { TestSimpleX1(); - AtomicIncrement(c); + ++c; })); } @@ -178,7 +179,7 @@ void TCoroTest::TestSimpleX1MultiThread() { t->Join(); } - UNIT_ASSERT_EQUAL(c, nThreads); + UNIT_ASSERT_EQUAL(c.load(), nThreads); } struct TTestObject { diff --git a/library/cpp/coroutine/engine/ya.make b/library/cpp/coroutine/engine/ya.make index fcd9b877417..d9efde81f45 100644 --- a/library/cpp/coroutine/engine/ya.make +++ b/library/cpp/coroutine/engine/ya.make @@ -7,7 +7,6 @@ GENERATE_ENUM_SERIALIZATION(stack/stack_common.h) PEERDIR( contrib/libs/libc_compat library/cpp/containers/intrusive_rb_tree - library/cpp/deprecated/atomic ) SRCS( |
