cplusplus / sender-receiver

Issues list for P2300
Apache License 2.0
20 stars 4 forks source link

The specification of `split` should require that the input sender is only connected once. #129

Open ericniebler opened 11 months ago

ericniebler commented 11 months ago

Issue by lewissbaker Wednesday Jun 23, 2021 at 23:59 GMT Originally opened as https://github.com/NVIDIA/stdexec/issues/130


@griwes mentioned that the current wording of execution::split allows customisations to execute the input operation multiple times. This seems counter to the point of this operation and the default implementation only connects the input sender once when it's called.

I think we should restrict customisations to only connect() the input operation once. i.e. make sure it's semantically equivalent to the default implementation

lewissbaker commented 4 months ago

Looking at the wording for split() in P2300R10, it still seems to be missing the wording for requirements on customizations of the split algorithm.

Notably, other algorithms do have such a paragraph - usually as the last paragraph - and says something like:

The expression connect(out_sndr, rcvr) has undefined behavior unless it creates an asynchronous operation ([async.ops]) that ...

lewissbaker commented 3 months ago

This issue should be addressed as part of redefining split in terms of an async_scope algorithm as part of #263 rather than spend extra LWG time fixing something that is just going to be changed later.