diff options
| author | tobo <[email protected]> | 2026-01-21 11:31:56 +0300 |
|---|---|---|
| committer | tobo <[email protected]> | 2026-01-21 11:46:12 +0300 |
| commit | 196d73457bdde3e801d17d0501919aa5424a339d (patch) | |
| tree | 6b9a080645bd6f11eb81ff1bbe6f83ab8cbbe0e5 /yt/cpp/mapreduce/http/http.cpp | |
| parent | 4cfd66b748085f4c7152cf2111ad82aa3b7e7b00 (diff) | |
TAtomic => std::atomic in yt/cpp/mapreduce/http
commit_hash:134c78c542ca2b3781b3595c5abd68fbccf6f649
Diffstat (limited to 'yt/cpp/mapreduce/http/http.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/http/http.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/yt/cpp/mapreduce/http/http.cpp b/yt/cpp/mapreduce/http/http.cpp index 96848bb2b05..e6efaa9d637 100644 --- a/yt/cpp/mapreduce/http/http.cpp +++ b/yt/cpp/mapreduce/http/http.cpp @@ -18,16 +18,11 @@ #include <library/cpp/json/json_writer.h> #include <library/cpp/string_utils/base64/base64.h> -#include <library/cpp/string_utils/quote/quote.h> #include <util/generic/singleton.h> -#include <util/generic/algorithm.h> - -#include <util/stream/mem.h> #include <util/string/builder.h> #include <util/string/cast.h> -#include <util/string/escape.h> #include <util/string/printf.h> #include <util/system/byteorder.h> @@ -530,7 +525,7 @@ TConnectionPtr TConnectionPool::Connect( if (connection->DeadLine < now) { continue; } - if (!AtomicCas(&connection->Busy, 1, 0)) { + if (bool expected = false; !connection->Busy.compare_exchange_strong(expected, true)) { continue; } @@ -576,7 +571,7 @@ void TConnectionPool::Release(TConnectionPtr connection) } connection->Socket->SetSocketTimeout(socketTimeout.Seconds()); - AtomicSet(connection->Busy, 0); + connection->Busy.store(false); Refresh(); } @@ -621,7 +616,7 @@ void TConnectionPool::Refresh() for (const auto& item : sortedConnections) { const auto& mapIterator = item.second; auto connection = mapIterator->second; - if (AtomicGet(connection->Busy)) { + if (connection->Busy.load()) { continue; } |
