cplusplus / sender-receiver

Issues list for P2300
Apache License 2.0
18 stars 3 forks source link

Should all receivers be moved into the completion signals? #98

Open ericniebler opened 8 months ago

ericniebler commented 8 months ago

Issue by msimberg Monday Jan 24, 2022 at 11:53 GMT Originally opened as https://github.com/NVIDIA/stdexec/issues/422


I don't know if this makes any difference in the wording, but there's currently quite a mix of how receivers are passed into completion signals:

Should they all just be std::moved? Or something else? I'll happily attempt to clean this up (including #379).

ericniebler commented 8 months ago

Comment by ericniebler Monday Jan 24, 2022 at 23:17 GMT


The answer depends. When the algorithms mention out_r, what they should be saying is that they are manipulating an rvalue (or xvalue to be more precise) that refers to a copy of out_r that lives in <place>. ("<place>" most likely is within the operation state.) If for the sake of the specification, you give that rvalue a name like out_r', then out_r' can appear in a set_[value|error|stopped] expression without a cast or a move, because it is already an rvalue.

Also see #403.

ericniebler commented 8 months ago

Comment by ericniebler Monday Jan 24, 2022 at 23:18 GMT


I'll happily attempt to clean this up (including #379).

Oh, and in case it wasn't clear ... YES PLEASE. :-) #403 also, while you're at it.