Skip to content

Commit edfde13

Browse files
committed
ActorSystem fix typo
1 parent 559d708 commit edfde13

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

ydb/library/actors/core/executor_pool_basic.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace NActors {
9090
ThreadCount = MaxThreadCount;
9191
auto semaphore = TSemaphore();
9292
semaphore.CurrentThreadCount = ThreadCount;
93-
Semaphore = semaphore.ConverToI64();
93+
Semaphore = semaphore.ConvertToI64();
9494
}
9595

9696
TBasicExecutorPool::TBasicExecutorPool(const TBasicExecutorPoolConfig& cfg, IHarmonizer *harmonizer)
@@ -126,7 +126,7 @@ namespace NActors {
126126
TSemaphore semaphore = TSemaphore::GetSemaphore(x);;
127127
if (semaphore.CurrentSleepThreadCount < 0) {
128128
semaphore.CurrentSleepThreadCount++;
129-
x = AtomicGetAndCas(&Semaphore, semaphore.ConverToI64(), x);
129+
x = AtomicGetAndCas(&Semaphore, semaphore.ConvertToI64(), x);
130130
if (x == oldX) {
131131
*needToWait = true;
132132
*needToBlock = true;
@@ -140,7 +140,7 @@ namespace NActors {
140140
if (semaphore.CurrentSleepThreadCount == AtomicLoad(&ThreadCount)) {
141141
AllThreadsSleep.store(true);
142142
}
143-
x = AtomicGetAndCas(&Semaphore, semaphore.ConverToI64(), x);
143+
x = AtomicGetAndCas(&Semaphore, semaphore.ConvertToI64(), x);
144144
if (x == oldX) {
145145
*needToWait = true;
146146
*needToBlock = false;
@@ -285,12 +285,12 @@ namespace NActors {
285285

286286
do {
287287
needToWakeUp = semaphore.CurrentSleepThreadCount > SharedExecutorsCount;
288-
i64 oldX = semaphore.ConverToI64();
288+
i64 oldX = semaphore.ConvertToI64();
289289
semaphore.OldSemaphore++;
290290
if (needToWakeUp) {
291291
semaphore.CurrentSleepThreadCount--;
292292
}
293-
x = AtomicGetAndCas(&Semaphore, semaphore.ConverToI64(), oldX);
293+
x = AtomicGetAndCas(&Semaphore, semaphore.ConvertToI64(), oldX);
294294
if (x == oldX) {
295295
break;
296296
}
@@ -495,14 +495,14 @@ namespace NActors {
495495
i16 prevCount = GetThreadCount();
496496
AtomicSet(ThreadCount, threads);
497497
TSemaphore semaphore = TSemaphore::GetSemaphore(AtomicGet(Semaphore));
498-
i64 oldX = semaphore.ConverToI64();
498+
i64 oldX = semaphore.ConvertToI64();
499499
semaphore.CurrentThreadCount = threads;
500500
if (threads > prevCount) {
501501
semaphore.CurrentSleepThreadCount += (i64)threads - prevCount;
502502
} else {
503503
semaphore.CurrentSleepThreadCount -= (i64)prevCount - threads;
504504
}
505-
AtomicAdd(Semaphore, semaphore.ConverToI64() - oldX);
505+
AtomicAdd(Semaphore, semaphore.ConvertToI64() - oldX);
506506
LWPROBE(ThreadCount, PoolId, PoolName, threads, MinThreadCount, MaxThreadCount, DefaultThreadCount);
507507
}
508508
}

ydb/library/actors/core/executor_pool_basic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace NActors {
173173
// Sign bit
174174
i16 CurrentThreadCount = 0; // 14 bits
175175

176-
inline i64 ConverToI64() {
176+
inline i64 ConvertToI64() {
177177
i64 value = (1ll << 34) + OldSemaphore;
178178
return value
179179
| (((i64)CurrentSleepThreadCount + (1 << 14)) << 35)

ydb/library/actors/core/executor_pool_basic_ut.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,21 @@ Y_UNIT_TEST_SUITE(BasicExecutorPool) {
225225
TBasicExecutorPool::TSemaphore semaphore;
226226
semaphore = TBasicExecutorPool::TSemaphore::GetSemaphore(0);
227227

228-
VALUES_EQUAL(0, semaphore.ConverToI64());
228+
VALUES_EQUAL(0, semaphore.ConvertToI64());
229229
semaphore = TBasicExecutorPool::TSemaphore::GetSemaphore(-1);
230-
VALUES_EQUAL(-1, semaphore.ConverToI64());
230+
VALUES_EQUAL(-1, semaphore.ConvertToI64());
231231
semaphore = TBasicExecutorPool::TSemaphore::GetSemaphore(1);
232-
VALUES_EQUAL(1, semaphore.ConverToI64());
232+
VALUES_EQUAL(1, semaphore.ConvertToI64());
233233

234234
for (i64 value = -1'000'000; value <= 1'000'000; ++value) {
235-
VALUES_EQUAL(TBasicExecutorPool::TSemaphore::GetSemaphore(value).ConverToI64(), value);
235+
VALUES_EQUAL(TBasicExecutorPool::TSemaphore::GetSemaphore(value).ConvertToI64(), value);
236236
}
237237

238238
for (i8 sleepThreads = -10; sleepThreads <= 10; ++sleepThreads) {
239239

240240
semaphore = TBasicExecutorPool::TSemaphore();
241241
semaphore.CurrentSleepThreadCount = sleepThreads;
242-
i64 initialValue = semaphore.ConverToI64();
242+
i64 initialValue = semaphore.ConvertToI64();
243243

244244
semaphore = TBasicExecutorPool::TSemaphore::GetSemaphore(initialValue - 1);
245245
VALUES_EQUAL(-1, semaphore.OldSemaphore);
@@ -257,7 +257,7 @@ Y_UNIT_TEST_SUITE(BasicExecutorPool) {
257257
semaphore = TBasicExecutorPool::TSemaphore();
258258
semaphore.OldSemaphore = expected;
259259
semaphore.CurrentSleepThreadCount = sleepThreads;
260-
UNIT_ASSERT_VALUES_EQUAL(semaphore.ConverToI64(), value);
260+
UNIT_ASSERT_VALUES_EQUAL(semaphore.ConvertToI64(), value);
261261
value++;
262262
}
263263

ydb/library/actors/core/ut_fat/actor_benchmark.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Y_UNIT_TEST_SUITE(HeavyActorBenchmark) {
3030
threadsList.push_back(threads);
3131
}
3232
std::vector<ui32> actorPairsList = {512};
33-
TActorBenchmark::RunSendActivateReceiveCSV(threadsList, actorPairsList, {1,100, 200}, TDuration::Seconds(1));
33+
TActorBenchmark::RunSendActivateReceiveCSV(threadsList, actorPairsList, {1,100, 200}, TDuration::Seconds(1));
3434
}
3535

3636
Y_UNIT_TEST(StarSendActivateReceiveCSV) {
@@ -40,7 +40,7 @@ Y_UNIT_TEST_SUITE(HeavyActorBenchmark) {
4040
}
4141
std::vector<ui32> actorPairsList = {512};
4242
std::vector<ui32> starsList = {10};
43-
TActorBenchmark::RunStarSendActivateReceiveCSV(threadsList, actorPairsList, starsList);
43+
TActorBenchmark::RunStarSendActivateReceiveCSV(threadsList, actorPairsList, starsList);
4444
}
4545

4646
}

0 commit comments

Comments
 (0)