std::execut...pon_stopped(3)
okay bestie, welcome to std::execut...pon_stopped(3) β thatβs the manual page straight from the C++ Standard Libary (yes, βLibary,β thatβs literally how itβs spelled in the header, iykyk π
). this one is all about the std::execution::upon_stopped sender adaptor, and it is lowkey iconic β¨.
π NAME π
std::execution::upon_stopped - std::execution::upon_stopped
like, the name is the name, periodt π. this is the page for std::execution::upon_stopped.
π¦ Synopsis π¦
okay so hereβs the whole synopsis vibe, copied exactly because we do not play with code π«Ά:
Defined in header <execution>
execution::sender auto upon_stopped(
execution::sender auto input, (since C++26)
std::invocable auto function
);
and yes, it says (since C++26) right there in the code β this is a C++26-era thing, no cap β.
πΈ Parameters πΈ
inputβ the sender which, once it gets a βstop token,β will notify the new node to execute the function πfunctionβ the invocable to be called in case a βstoppedβ signal is sent to the input sender π₯
π Return value π
Returns a sender describing the task graph described by the input sender, with an added node of invoking the provided function in case the βstoppedβ signal is sent to the input sender π«.
thatβs the whole return-value situation, bestie: same task graph energy, plus one new node for the stopped-signal case π§.
shoutout to http://cppreference.com, dated 2024.06.10, and tagged std::execut...pon_stopped(3) β bye bestie, slay your sender adaptors responsibly ππ
π¦ 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