cplusplus / sender-receiver

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

Add ability to know when computing completion-signatures whether the call to connect() will throw #247

Open lewissbaker opened 3 months ago

lewissbaker commented 3 months ago

Some algorithms, such as let_value() need to call connect() on child operations after the parent operation has already been started.

This means the parent operation needs to handle any potential exceptions that might be thrown from the call to connect() on the child sender and whether or not it needs to handle such exceptions may affect the computation of the operation's completion-signatures.

However, this currently requires having some receiver that you can pass to the call to connect() to be able to query its noexcept-ness. But at the time that you compute the completion signatures based on the receiver's environment, you aren't necessarily able to produce a receiver to pass to the child operation (its type may depend on the type of the receiver passed to the parent operation).

We either need to change the way we compute completion-signatures to take the receiver instead of the environment, or we need to add an additional query to senders to ask whether the connect() method will always be noexcept. Note that the latter also requires that receivers are always nothrow move-constructible as otherwise the noexceptness of the connect() method may depend on the noexceptness of the receiver's move constructor.

ericniebler commented 3 months ago

this is covered by #246