sync_wait
should work with just_stopped()
and just_error(e)
.
#299
Labels
needs-proposed-resolution
This issue does not yet have a proposed resolution but needs one
I mentioned this her but got no replies: https://lists.isocpp.org/std-proposals/2024/10/11308.php
The design options are:
std::variant<>
or some other untreatable type.In as much as
sync_wait
is intended(?) to be beginner-friendly, I lean towardsync_wait(just_stopped()) -> std::optional<std::tuple<>>
(ideallynoexcept
) since it’s what a beginner would expect. Alternatively, it could returnstd::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 realisticallysync_wait(repeat_until_ctrl_c(event_loop_sender))
should at least work.The text was updated successfully, but these errors were encountered: