summaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/coroutine_ut.cpp
diff options
context:
space:
mode:
authortobo <[email protected]>2026-01-29 19:19:17 +0300
committertobo <[email protected]>2026-01-29 19:43:54 +0300
commitae6547ef7935f56cdc7d9adaabfcf125e06e471a (patch)
tree6253b976f0ccb3d647a9062d7f223bcc73bf64ea /library/cpp/coroutine/engine/coroutine_ut.cpp
parent4922622314ecf0d543b15f72a2b2d6a8423a7eca (diff)
TAtomic => std::atomic in library/cpp/coroutine/engine
commit_hash:dec1324c908f86e371bfda82e5cb1d90f06a9d06
Diffstat (limited to 'library/cpp/coroutine/engine/coroutine_ut.cpp')
-rw-r--r--library/cpp/coroutine/engine/coroutine_ut.cpp9
1 files changed, 5 insertions, 4 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 {