aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/impl.cpp
diff options
context:
space:
mode:
authoralexeylaptev <alexeylaptev@yandex-team.ru>2022-02-10 16:50:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:06 +0300
commit3106abc0443cda789ce4968aeee63d3a8fcc7d85 (patch)
treeec44b9884cc11c2a7b4f4dc7fd36a1ae1ba2d3db /library/cpp/coroutine/engine/impl.cpp
parenta76f5e1efe665e1bb125f05ae275b2a6226517d9 (diff)
downloadydb-3106abc0443cda789ce4968aeee63d3a8fcc7d85.tar.gz
Restoring authorship annotation for <alexeylaptev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/coroutine/engine/impl.cpp')
-rw-r--r--library/cpp/coroutine/engine/impl.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/coroutine/engine/impl.cpp b/library/cpp/coroutine/engine/impl.cpp
index 7ae6f74051..10fc6d9052 100644
--- a/library/cpp/coroutine/engine/impl.cpp
+++ b/library/cpp/coroutine/engine/impl.cpp
@@ -1,8 +1,8 @@
#include "impl.h"
-#include "stack/stack_allocator.h"
-#include "stack/stack_guards.h"
-
+#include "stack/stack_allocator.h"
+#include "stack/stack_guards.h"
+
#include <util/generic/scope.h>
#include <util/thread/singleton.h>
#include <util/stream/format.h>
@@ -18,15 +18,15 @@ void TCont::TJoinWait::Wake() noexcept {
Cont_.ReSchedule();
}
-TCont::TCont(NCoro::NStack::IAllocator& allocator,
- uint32_t stackSize,
- TContExecutor& executor,
+TCont::TCont(NCoro::NStack::IAllocator& allocator,
+ uint32_t stackSize,
+ TContExecutor& executor,
NCoro::TTrampoline::TFunc func,
- const char* name) noexcept
+ const char* name) noexcept
: Executor_(executor)
, Name_(name)
, Trampoline_(
- allocator,
+ allocator,
stackSize,
std::move(func),
this
@@ -117,11 +117,11 @@ void TCont::ReSchedule() noexcept {
TContExecutor::TContExecutor(
- uint32_t defaultStackSize,
+ uint32_t defaultStackSize,
THolder<IPollerFace> poller,
NCoro::IScheduleCallback* scheduleCallback,
NCoro::IEnterPollerCallback* enterPollerCallback,
- NCoro::NStack::EGuard defaultGuard,
+ NCoro::NStack::EGuard defaultGuard,
TMaybe<NCoro::NStack::TPoolAllocatorSettings> poolSettings,
NCoro::ITime* time
)
@@ -130,9 +130,9 @@ TContExecutor::TContExecutor(
, DefaultStackSize_(defaultStackSize)
, Poller_(std::move(poller))
, Time_(time)
-{
- StackAllocator_ = NCoro::NStack::GetAllocator(poolSettings, defaultGuard);
-}
+{
+ StackAllocator_ = NCoro::NStack::GetAllocator(poolSettings, defaultGuard);
+}
TContExecutor::~TContExecutor() {
Y_VERIFY(Allocated_ == 0, "leaked %u coroutines", (ui32)Allocated_);
@@ -253,10 +253,10 @@ TCont* TContExecutor::CreateOwned(
return cont;
}
-NCoro::NStack::TAllocatorStats TContExecutor::GetAllocatorStats() const noexcept {
- return StackAllocator_->GetStackStats();
-}
-
+NCoro::NStack::TAllocatorStats TContExecutor::GetAllocatorStats() const noexcept {
+ return StackAllocator_->GetStackStats();
+}
+
void TContExecutor::Release(TCont* cont) noexcept {
delete cont;
Allocated_ -= 1;