aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/actor/executor.cpp
diff options
context:
space:
mode:
authorAlexander Gololobov <davenger@yandex-team.com>2022-02-10 16:47:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:38 +0300
commitfccc62e9bfdce9be2fe7e0f23479da3a5512211a (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/messagebus/actor/executor.cpp
parent39608cdb86363c75ce55b2b9a69841c3b71f22cf (diff)
downloadydb-fccc62e9bfdce9be2fe7e0f23479da3a5512211a.tar.gz
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/actor/executor.cpp')
-rw-r--r--library/cpp/messagebus/actor/executor.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp
index b58e07f4bd..7a2227a458 100644
--- a/library/cpp/messagebus/actor/executor.cpp
+++ b/library/cpp/messagebus/actor/executor.cpp
@@ -18,7 +18,7 @@ using namespace NActor::NPrivate;
namespace {
struct THistoryInternal {
struct TRecord {
- TAtomic MaxQueueSize;
+ TAtomic MaxQueueSize;
TRecord()
: MaxQueueSize()
@@ -27,7 +27,7 @@ namespace {
TExecutorHistory::THistoryRecord Capture() {
TExecutorHistory::THistoryRecord r;
- r.MaxQueueSize = AtomicGet(MaxQueueSize);
+ r.MaxQueueSize = AtomicGet(MaxQueueSize);
return r;
}
};
@@ -237,14 +237,14 @@ size_t TExecutor::GetWorkQueueSize() const {
return WorkItems.Size();
}
-using namespace NTSAN;
-
+using namespace NTSAN;
+
ui32 TExecutor::GetMaxQueueSizeAndClear() const {
ui32 max = 0;
for (unsigned i = 0; i < WorkerThreads.size(); ++i) {
- TExecutorWorkerThreadLocalData* wtls = RelaxedLoad(&WorkerThreads[i]->ThreadLocalData);
- max = Max<ui32>(max, RelaxedLoad(&wtls->MaxQueueSize));
- RelaxedStore<ui32>(&wtls->MaxQueueSize, 0);
+ TExecutorWorkerThreadLocalData* wtls = RelaxedLoad(&WorkerThreads[i]->ThreadLocalData);
+ max = Max<ui32>(max, RelaxedLoad(&wtls->MaxQueueSize));
+ RelaxedStore<ui32>(&wtls->MaxQueueSize, 0);
}
return max;
}
@@ -269,7 +269,7 @@ TExecutorStatus TExecutor::GetStatusRecordInternal() const {
ss << "work items: " << GetWorkQueueSize() << "\n";
ss << "workers:\n";
for (unsigned i = 0; i < WorkerThreads.size(); ++i) {
- ss << "-- " << AtomicGet(*AtomicGet(WorkerThreads[i]->WhatThreadDoesLocation)) << "\n";
+ ss << "-- " << AtomicGet(*AtomicGet(WorkerThreads[i]->WhatThreadDoesLocation)) << "\n";
}
r.Status = ss.Str();
}
@@ -299,8 +299,8 @@ TAutoPtr<IWorkItem> TExecutor::DequeueWork() {
auto& wtls = TlsRef(WorkerThreadLocalData);
- if (queueSize > RelaxedLoad(&wtls.MaxQueueSize)) {
- RelaxedStore<ui32>(&wtls.MaxQueueSize, queueSize);
+ if (queueSize > RelaxedLoad(&wtls.MaxQueueSize)) {
+ RelaxedStore<ui32>(&wtls.MaxQueueSize, queueSize);
}
return wi;