From ec287d71d6cc8fb776662e4e7f2409d3036769fe Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Fri, 16 Jan 2026 01:52:30 +0300 Subject: Intermediate changes commit_hash:e2a707e415a488963509ff8fd5a9609c8e77b16d --- library/cpp/neh/rpc.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'library/cpp') diff --git a/library/cpp/neh/rpc.cpp b/library/cpp/neh/rpc.cpp index 13813bea1fc..943b144d1fe 100644 --- a/library/cpp/neh/rpc.cpp +++ b/library/cpp/neh/rpc.cpp @@ -9,6 +9,8 @@ #include #include +#include + using namespace NNeh; namespace { @@ -69,7 +71,7 @@ namespace { TGuard guard(L_); push_back(std::make_pair(service, srv)); - AtomicIncrement(SelfVersion_); + ++SelfVersion_; } inline void Listen() { @@ -213,7 +215,7 @@ namespace { } inline bool UpdateServices(TSrvs& srvs, i64& version) const { - if (AtomicGet(SelfVersion_) == version) { + if (SelfVersion_.load() == version) { return false; } @@ -224,7 +226,7 @@ namespace { for (const auto& it : *this) { srvs[TParsedLocation(it.first).Service] = it.second; } - version = AtomicGet(SelfVersion_); + version = SelfVersion_.load(); return true; } @@ -246,7 +248,7 @@ namespace { TSpinLock L_; IRequestQueueRef RQ_; THolder LF_; - TAtomic SelfVersion_ = 1; + std::atomic SelfVersion_ = 1; TCheck C_; NThreading::TThreadLocalValue LocalMap_; -- cgit v1.3