Open
Description
I mentioned this her but got no replies: https://lists.isocpp.org/std-proposals/2024/10/11308.php
The design options are:
- Either have unstoppable senders result in no optionality in the result.
- Consider having a lack of value result correspond to
std::variant<>
or some other untreatable type.
In as much as sync_wait
is intended(?) to be beginner-friendly, I lean toward sync_wait(just_stopped()) -> std::optional<std::tuple<>>
(ideally noexcept
) since it’s what a beginner would expect. Alternatively, it could return std::optional<std::variant<>>
reflecting that it can only be stopped.
Likewise I could see a fully-pedantic approach, so sync_wait(just()) -> std::tuple<>
(noexcept
?) since it can only succeed.
Regardless, sync_wait(just_stopped())
or more realistically sync_wait(repeat_until_ctrl_c(event_loop_sender))
should at least work.