aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-05-27 19:27:10 +0300
committerarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-05-27 19:39:44 +0300
commit110c717d9fb7f10ee9a794d599b4763c4d6396cc (patch)
tree4557334035bab260b3e3ca3c10ecb9947c77cea5
parent9dfebfda463d92aaeea1c51c5715419568926c8f (diff)
downloadydb-110c717d9fb7f10ee9a794d599b4763c4d6396cc.tar.gz
babenko issues of rXXXXXX
56ce35abdbfa513ca09134b52717e139e175cdb7
-rw-r--r--yt/yt/core/concurrency/fiber_scheduler_thread.cpp8
-rw-r--r--yt/yt/core/misc/shutdown.cpp4
2 files changed, 3 insertions, 9 deletions
diff --git a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
index f4577a40c2..f29aebc3da 100644
--- a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
+++ b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
@@ -937,10 +937,6 @@ private:
////////////////////////////////////////////////////////////////////////////////
-std::atomic<bool> ShutdownManagerPrepared_ = false;
-
-////////////////////////////////////////////////////////////////////////////////
-
TFiberSchedulerThread::TFiberSchedulerThread(
TString threadGroupName,
TString threadName,
@@ -955,9 +951,7 @@ void TFiberSchedulerThread::ThreadMain()
// Hold this strongly.
auto this_ = MakeStrong(this);
- if (!ShutdownManagerPrepared_.exchange(true, std::memory_order::relaxed)) {
- EnsureSafeShutdown();
- }
+ EnsureSafeShutdown();
try {
YT_LOG_DEBUG("Thread started (Name: %v)",
diff --git a/yt/yt/core/misc/shutdown.cpp b/yt/yt/core/misc/shutdown.cpp
index 92a231f870..412db68119 100644
--- a/yt/yt/core/misc/shutdown.cpp
+++ b/yt/yt/core/misc/shutdown.cpp
@@ -179,7 +179,7 @@ public:
return ShutdownThreadId_.load();
}
- void EnsureSystemInvokersRunning() const
+ void EnsureSafeShutdown() const
{
NConcurrency::GetFinalizerInvoker();
NConcurrency::GetShutdownInvoker();
@@ -285,7 +285,7 @@ size_t GetShutdownThreadId()
void EnsureSafeShutdown()
{
- TShutdownManager::Get()->EnsureSystemInvokersRunning();
+ TShutdownManager::Get()->EnsureSafeShutdown();
}
////////////////////////////////////////////////////////////////////////////////