summaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/impl.cpp
diff options
context:
space:
mode:
authoralexeylaptev <[email protected]>2022-02-10 16:50:06 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:50:06 +0300
commit13dbd0acb78595551b843005d6bd021bdc1a859b (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/coroutine/engine/impl.cpp
parent3106abc0443cda789ce4968aeee63d3a8fcc7d85 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 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 10fc6d90524..7ae6f74051e 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;