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
commit811c91d683d6123a2aa69baa10b30184f5e1204d (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yt/memory/ref_counted-inl.h
parent7c7a0655bcf00449b1fcacc2c658cc4d5c3aca7b (diff)
downloadydb-811c91d683d6123a2aa69baa10b30184f5e1204d.tar.gz
Restoring authorship annotation for <halin-george@yandex-team.ru>. Commit 2 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 3cbeb65703..e6d64fec18 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);