aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-03-13 17:40:07 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-03-13 18:05:25 +0300
commitc37fe2a1ed376217738ce2d403244563239e2090 (patch)
tree3c7c7c4e394d169abc4dbe3f4a2f152e60fa57fb
parent7eae4ffeba222a4785fad6a8cc4d9884e0bbc60e (diff)
downloadydb-c37fe2a1ed376217738ce2d403244563239e2090.tar.gz
Intermediate changes
-rw-r--r--yt/yt/core/concurrency/periodic_executor_base-inl.h8
-rw-r--r--yt/yt/core/concurrency/unittests/fair_share_action_queue_ut.cpp4
-rw-r--r--yt/yt/core/net/dialer.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/yt/yt/core/concurrency/periodic_executor_base-inl.h b/yt/yt/core/concurrency/periodic_executor_base-inl.h
index 33dd40db5b..a2985b7251 100644
--- a/yt/yt/core/concurrency/periodic_executor_base-inl.h
+++ b/yt/yt/core/concurrency/periodic_executor_base-inl.h
@@ -152,16 +152,12 @@ void TPeriodicExecutorBase<TInvocationTimePolicy>::PostCallback()
GuardedInvoke(
Invoker_,
[weakThis = MakeWeak(this)] {
- auto strongThis = weakThis.Lock();
-
- if (strongThis) {
+ if (auto strongThis = weakThis.Lock()) {
strongThis->RunCallback();
}
},
[weakThis = MakeWeak(this)] {
- auto strongThis = weakThis.Lock();
-
- if (strongThis) {
+ if (auto strongThis = weakThis.Lock()) {
strongThis->OnCallbackCancelled();
}
});
diff --git a/yt/yt/core/concurrency/unittests/fair_share_action_queue_ut.cpp b/yt/yt/core/concurrency/unittests/fair_share_action_queue_ut.cpp
index 5f98acb3f0..1d948a187d 100644
--- a/yt/yt/core/concurrency/unittests/fair_share_action_queue_ut.cpp
+++ b/yt/yt/core/concurrency/unittests/fair_share_action_queue_ut.cpp
@@ -23,6 +23,8 @@ namespace {
using namespace NProfiling;
+////////////////////////////////////////////////////////////////////////////////
+
class TTestFairShareActionQueue
: public ::testing::Test
{
@@ -162,5 +164,7 @@ TEST_F(TTestFairShareActionQueue, TestProfiling)
VerifyJson(*json, std::move(bucketToQueues));
}
+////////////////////////////////////////////////////////////////////////////////
+
} // namespace
} // namespace NYT::NConcurrency
diff --git a/yt/yt/core/net/dialer.cpp b/yt/yt/core/net/dialer.cpp
index ece39cdbf4..4f1fb9988f 100644
--- a/yt/yt/core/net/dialer.cpp
+++ b/yt/yt/core/net/dialer.cpp
@@ -241,9 +241,9 @@ private:
YT_VERIFY(Pollable_);
auto pollable = std::move(Pollable_);
- SpinLock_.Release();
+
+ auto inverseGuard = Unguard(SpinLock_);
YT_UNUSED_FUTURE(Poller_->Unregister(pollable));
- SpinLock_.Acquire();
}
void Connect(TGuard<NThreading::TSpinLock>& guard)