Skip to content

the just senders should have a parallel forward progress guarantee #335

@ericniebler

Description

@ericniebler

just, just_stopped, and just_error do not do anything that would prevent them from making parallel forward progress.

Proposed resolution

Change the last paragraph of [exec.just]/p2 as follows:

 For just, just_error, and just_stopped, let set-cpo be set_value, set_error,
 and set_stopped, respectively. The exposition-only class template impls-for
 ([exec.snd.general]) is specialized for just-cpo as follows:
 
 namespace std::execution {
   template<>
   struct impls-for<decayed-typeof<just-cpo>> : default-impls {
+    static constexpr auto get-attrs =
+      [](auto&&) noexcept {
+        struct attrs { // exposition only
+          static constexpr forward_progress_guarantee query(get_forward_progress_guarantee_t) noexcept {
+            return forward_progress_guarantee::parallel;
+          }
+        };
+        return attrs{};
+      };
 
     static constexpr auto start =
       [](auto& state, auto& rcvr) noexcept -> void {
         auto& [...ts] = state;
         set-cpo(std::move(rcvr), std::move(ts)...);
       };
   };
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions