aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/event_holder_pool.h
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-02-10 16:46:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:29 +0300
commitf773626848a7c7456803654292e716b83d69cc12 (patch)
treedb052dfcf9134f492bdbb962cb6c16cea58e1ed3 /library/cpp/actors/interconnect/event_holder_pool.h
parentf43ab775d197d300eb67bd4497632b909cd7c2a5 (diff)
downloadydb-f773626848a7c7456803654292e716b83d69cc12.tar.gz
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/interconnect/event_holder_pool.h')
-rw-r--r--library/cpp/actors/interconnect/event_holder_pool.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/actors/interconnect/event_holder_pool.h b/library/cpp/actors/interconnect/event_holder_pool.h
index b6090a3bc8..90ce486e9e 100644
--- a/library/cpp/actors/interconnect/event_holder_pool.h
+++ b/library/cpp/actors/interconnect/event_holder_pool.h
@@ -12,12 +12,12 @@ namespace NActors {
std::list<TEventHolder> FreeQueue;
TStackVec<THolder<IEventBase>, MaxEvents> Events;
TStackVec<THolder<TEventSerializedData>, MaxEvents> Buffers;
- std::shared_ptr<std::atomic<TAtomicBase>> Counter;
+ std::shared_ptr<std::atomic<TAtomicBase>> Counter;
ui64 NumBytes = 0;
~TEvFreeItems() {
if (Counter) {
- TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
+ TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
Y_VERIFY(res >= 0);
}
}
@@ -26,8 +26,8 @@ namespace NActors {
Y_VERIFY(!Counter);
const auto& counter = common->DestructorQueueSize;
const auto& max = common->MaxDestructorQueueSize;
- if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
- counter->fetch_sub(NumBytes);
+ if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
+ counter->fetch_sub(NumBytes);
return false;
}
Counter = counter;