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 | 9ff71a8b1ce582cb08730cb11eb25839441317d1 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/coroutine/engine/trampoline.cpp | |
parent | d26952c54d3ee92bbdc1888b64f3dec893e5a383 (diff) | |
download | ydb-9ff71a8b1ce582cb08730cb11eb25839441317d1.tar.gz |
Restoring authorship annotation for <vlad-kolotvin@yandex-team.ru>. Commit 2 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 2ec89fe23b..10ea69ddc3 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(); + } } |