Clarify that scheduler returned by get_scheduler on receiver is only valid until the operation completes #112
Labels
bug
Something isn't working
design
needs-proposed-resolution
This issue does not yet have a proposed resolution but needs one
P1
Thursday Dec 02, 2021 at 21:11 GMT
Originally opened as NVIDIA/stdexec#295
Similar to the wording in the
get_stop_token()
CPO, which only guarantees that the token returned is valid until the operation completes, we should do the same for theget_scheduler()
CPO.We should be careful to clarify what operations are valid after calling set_xxx on the receiver.
e.g. is it valid to call:
set_xxx
(could some schedulers be reference-counting in the destructor?)schedule()
CPO (but just not connect/start it)Another possibility is to tie the end-of-validity of the scheduler to the destructor of the receiver (or move-constructed copy of the receiver).
Proposed resolution:
Change [exec.recv.concepts] p3 as follows:
The text was updated successfully, but these errors were encountered: