diff options
author | vlad-kolotvin <vlad-kolotvin@yandex-team.ru> | 2022-02-10 16:48:20 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:20 +0300 |
commit | d26952c54d3ee92bbdc1888b64f3dec893e5a383 (patch) | |
tree | 72e5a06ef50a8d3041aaa60f5d7c287025cf657d /library/cpp/coroutine/engine/trampoline.cpp | |
parent | 805923d9caf5cf5b7fd5f4aa268f783503260d62 (diff) | |
download | ydb-d26952c54d3ee92bbdc1888b64f3dec893e5a383.tar.gz |
Restoring authorship annotation for <vlad-kolotvin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/coroutine/engine/trampoline.cpp')
-rw-r--r-- | library/cpp/coroutine/engine/trampoline.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/coroutine/engine/trampoline.cpp b/library/cpp/coroutine/engine/trampoline.cpp index 10ea69ddc3..2ec89fe23b 100644 --- a/library/cpp/coroutine/engine/trampoline.cpp +++ b/library/cpp/coroutine/engine/trampoline.cpp @@ -14,21 +14,21 @@ namespace NCoro { -TTrampoline::TTrampoline(NStack::IAllocator& allocator, ui32 stackSize, TFunc f, TCont* cont) noexcept +TTrampoline::TTrampoline(NStack::IAllocator& allocator, ui32 stackSize, TFunc f, TCont* cont) noexcept : Stack_(allocator, stackSize, cont->Name()) , Clo_{this, Stack_.Get(), cont->Name()} , Ctx_(Clo_) - , Func_(std::move(f)) + , Func_(std::move(f)) , Cont_(cont) {} void TTrampoline::DoRun() { - if (Cont_->Executor()->FailOnError()) { - Func_(Cont_); - } else { - try { - Func_(Cont_); - } catch (...) {} + if (Cont_->Executor()->FailOnError()) { + Func_(Cont_); + } else { + try { + Func_(Cont_); + } catch (...) {} } Cont_->Terminate(); @@ -42,9 +42,9 @@ TTrampoline::TTrampoline(NStack::IAllocator& allocator, ui32 stackSize, TFunc f, return Cont_->Name(); } - void TTrampoline::DoRunNaked() { - DoRun(); - - abort(); - } + void TTrampoline::DoRunNaked() { + DoRun(); + + abort(); + } } |