Skip to content

Commit

Permalink
Fix coro issues (#114)
Browse files Browse the repository at this point in the history
* fixed a few coroutine related issues

* fixed formatting issues

* reverted te chnage checking the result from unhandled_stopped().

* addressed and issue which resulted in requiring a copy ctor

* removed a static_assert left for testing

* clang-format
  • Loading branch information
dietmarkuehl authored Jan 10, 2025
1 parent 096a664 commit ba3abd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions include/beman/execution26/detail/basic_operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ namespace beman::execution26::detail {
*/
template <typename Sender, typename Receiver>
requires ::beman::execution26::detail::
valid_specialization<::beman::execution26::detail::state_type, Sender, Receiver>
struct basic_operation : ::beman::execution26::detail::basic_state<Sender, Receiver> {
//-dk:TODO why is the remove_cvref_t needed...?
valid_specialization<::beman::execution26::detail::state_type, std::remove_cvref_t<Sender>, Receiver>
struct basic_operation : ::beman::execution26::detail::basic_state<Sender, Receiver> {
// static_assert(std::same_as<Sender, std::remove_cvref_t<Sender>>);
friend struct ::beman::execution26::start_t;
using operation_state_concept = ::beman::execution26::operation_state_t;
using tag_t = ::beman::execution26::tag_of_t<Sender>;
Expand Down
4 changes: 3 additions & 1 deletion include/beman/execution26/detail/continues_on.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ struct continues_on_t {
auto operator()(Sender&& sender, Scheduler&& scheduler) const {
auto domain(::beman::execution26::detail::get_domain_early(sender));
return ::beman::execution26::transform_sender(
domain, ::beman::execution26::detail::make_sender(*this, scheduler, ::std::forward<Sender>(sender)));
domain,
::beman::execution26::detail::make_sender(
*this, std::forward<Scheduler>(scheduler), ::std::forward<Sender>(sender)));
}
};

Expand Down
6 changes: 4 additions & 2 deletions include/beman/execution26/detail/sync_wait.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct sync_wait_receiver {

struct sync_wait_t {
template <typename Sender>
auto apply_sender(Sender&& sender) {
auto apply_sender(Sender&& sender) const {
::beman::execution26::detail::sync_wait_state<Sender> state;
auto op{::beman::execution26::connect(::std::forward<Sender>(sender),
::beman::execution26::detail::sync_wait_receiver<Sender>{&state})};
Expand All @@ -93,7 +93,9 @@ struct sync_wait_t {
typename ::beman::execution26::detail::sync_wait_result_type<Sender>;
{
::beman::execution26::apply_sender(
::beman::execution26::detail::get_domain_early(sender), self, ::std::forward<Sender>(sender))
::beman::execution26::detail::get_domain_early(std::forward<Sender>(sender)),
self,
::std::forward<Sender>(sender))
} -> ::std::same_as<::beman::execution26::detail::sync_wait_result_type<Sender>>;
}
auto operator()(Sender&& sender) const {
Expand Down

0 comments on commit ba3abd3

Please sign in to comment.