| 15 | namespace NCoro { |
| 16 | |
| 17 | TTrampoline::TTrampoline(NStack::IAllocator& allocator, ui32 stackSize, TFunc f, TCont* cont) noexcept |
| 18 | : Stack_(allocator, stackSize, cont->Name()) |
| 19 | , Clo_{this, Stack_.Get(), cont->Name()} |
| 20 | , Ctx_(Clo_) |
| 21 | , Func_(std::move(f)) |
| 22 | , Cont_(cont) |
| 23 | {} |
| 24 | |
| 25 | void TTrampoline::DoRun() { |
| 26 | if (Cont_->Executor()->FailOnError()) { |