aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/logging/logger-inl.h
diff options
context:
space:
mode:
authorlukyan <lukyan@yandex-team.com>2023-12-05 19:07:41 +0300
committerlukyan <lukyan@yandex-team.com>2023-12-05 20:50:57 +0300
commitd5b84ed65f77eab0135b9d0ee025556f4507b62b (patch)
tree5c5db90ad950923a5554c4a0f5fac239b3f44c53 /library/cpp/yt/logging/logger-inl.h
parentddadddf4718f23838ed4ffb8e6aa1f126301cf55 (diff)
downloadydb-d5b84ed65f77eab0135b9d0ee025556f4507b62b.tar.gz
Use volatile TLS in library/cpp/yt
Diffstat (limited to 'library/cpp/yt/logging/logger-inl.h')
-rw-r--r--library/cpp/yt/logging/logger-inl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/cpp/yt/logging/logger-inl.h b/library/cpp/yt/logging/logger-inl.h
index 6f489da82d..5e2b6795dc 100644
--- a/library/cpp/yt/logging/logger-inl.h
+++ b/library/cpp/yt/logging/logger-inl.h
@@ -8,6 +8,8 @@
#include <library/cpp/yt/yson_string/convert.h>
#include <library/cpp/yt/yson_string/string.h>
+#include <library/cpp/yt/misc/tls.h>
+
namespace NYT::NLogging {
////////////////////////////////////////////////////////////////////////////////
@@ -98,8 +100,8 @@ private:
TSharedMutableRef Buffer_;
- static thread_local TPerThreadCache* Cache_;
- static thread_local bool CacheDestroyed_;
+ static YT_THREAD_LOCAL(TPerThreadCache*) Cache_;
+ static YT_THREAD_LOCAL(bool) CacheDestroyed_;
static TPerThreadCache* GetCache();
static constexpr size_t ChunkSize = 128_KB - 64;