std::genera...inal_suspend(3)
π NAME π
std::generator::promise_type::final_suspend β yes bestie, thatβs the whole iconic name π
. This one comes from the C++ Standard Libary manual, and she is very specific about final-suspend business β¨.
πΈ Synopsis πΈ
auto final_suspend() noexcept; (since C++23)
Okay so let x be some generator object. final_suspend does exactly this, in order:
- Pops the coroutine handle from the top of
*active_. - If
*x.active_is not empty, resumes execution of the coroutine referred to byx.active_->top(). If it is empty, control flow returns to the current coroutine caller or resumer.
π¨ Big rule, no cap: a handle referring to the coroutine whose promise object is*thismust be at the top of*x.active_ofx. This function must be called by the coroutine upon reaching its final suspend point, otherwise the behavior is undefined.
π Parameters π
(none)β literally no parameters, bestie. No arguments, no drama, just vibes π«Ά.
π¦ Return value π¦
An awaitable object of unspecified type whose member functions are configured to suspend the calling coroutine β¨.
Mwah π β this gem came from http://cppreference.com, dated 2024.06.10. Stay suspended, bestie π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms