aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/ref_counted-inl.h
diff options
context:
space:
mode:
authorhalin-george <halin-george@yandex-team.ru>2022-02-10 16:50:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:07 +0300
commit7c7a0655bcf00449b1fcacc2c658cc4d5c3aca7b (patch)
tree41c83fd863c44839297aff8b2c301ec6b1853244 /library/cpp/yt/memory/ref_counted-inl.h
parent811ece47d06924d20a94f89d1b0f5cd37254a49c (diff)
downloadydb-7c7a0655bcf00449b1fcacc2c658cc4d5c3aca7b.tar.gz
Restoring authorship annotation for <halin-george@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt/memory/ref_counted-inl.h')
-rw-r--r--library/cpp/yt/memory/ref_counted-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/yt/memory/ref_counted-inl.h b/library/cpp/yt/memory/ref_counted-inl.h
index e6d64fec18..3cbeb65703 100644
--- a/library/cpp/yt/memory/ref_counted-inl.h
+++ b/library/cpp/yt/memory/ref_counted-inl.h
@@ -71,7 +71,7 @@ Y_FORCE_INLINE int TRefCounter::GetRefCount() const noexcept
Y_FORCE_INLINE void TRefCounter::Ref() const noexcept
{
- // It is safe to use relaxed here, since new reference is always created from another live reference.
+ // It is safe to use relaxed here, since new reference is always created from another live reference.
StrongCount_.fetch_add(1, std::memory_order_relaxed);
YT_ASSERT(WeakCount_.load(std::memory_order_relaxed) > 0);
@@ -93,7 +93,7 @@ Y_FORCE_INLINE bool TRefCounter::Unref() const
//
// See http://www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters
//
- auto oldStrongCount = StrongCount_.fetch_sub(1, std::memory_order_release);
+ auto oldStrongCount = StrongCount_.fetch_sub(1, std::memory_order_release);
YT_ASSERT(oldStrongCount > 0);
if (oldStrongCount == 1) {
StrongCount_.load(std::memory_order_acquire);