added a proposed resolution for issue 4347#549
added a proposed resolution for issue 4347#549dietmarkuehl wants to merge 5 commits intocplusplus:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a proposed resolution for issue 4347, which involves restructuring the stop token management in C++ execution's task class template. The resolution moves the stop_source_type and stop_token_type members from the promise_type class to the state class, and introduces a new exposition-only function get-stop-token() to manage stop token initialization more appropriately.
Changes:
- Adds an
optional<stop_source_type>member andget-stop-token()function to thetask::stateclass - Modifies the
start()method specification and adds the newget-stop-token()method specification in [task.state] - Removes
tokenandsourcemembers frompromise_typein [task.promise] - Updates
get_env()specification to useSTATE(*this).get-stop-token()instead oftoken
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
OK. I try to phrase it differently. I don’ really have a Returns: clause but the last paragraph does look somewhat like it. The logic (for type erasing the stop token type) is: The source shouldn’t exist if the type from the receiver matches. |
No description provided.