-
Notifications
You must be signed in to change notification settings - Fork 32
New issue for US 249-379: Move specification for task::stop_token #532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
xml/issue4485.xml
Outdated
| <li>-4.4- <tt><i>prom</i>.token.stop_requested()</tt> returns <tt>st.stop_requested()</tt>;</li> | ||
| <li>-4.5- <tt><i>prom</i>.token.stop_requested()</tt> returns <tt>st.stop_requested()</tt><del>;</del><ins>.</ins></li> | ||
| <li><del>-4.6- for types `Fn` nad `Init` such that both <tt>invocable<Fn></tt> and <tt>constructible_from<Fn, Init></tt> are modeled, | ||
| <tt>stop_token_type::callback_type<Fn></tt> modes l<tt>stoppable-callback-for<Fn, stop_token_type, Init></tt>.</del></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing a requirement that requesting stop on st's stop source results in invocation of the callbacks registered with the task's. I wonder if that is what this was trying to say (but totally failing to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is implied by stoppable-callback-for semantics requirements (https://eel.is/c++draft/thread.stoptoken#stoptoken.concepts-3.2.1.3.) and the fact that stop_requested and stop_possible are propagated fro st to prom.token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we actually say that the propagation of stop_requested amounts to making a stop request on prom.source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's intended (as far as I remember), because if you stop_token_type is the same as st, then no propagation is required. You can just initialize _prom_.token with st.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, I do not see how you may mentain equivalent returns for st.stop_requested() and prom.token.stop_requested() without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing a qualifier that would say that these properties hold when asynchronous operation is active, and thus forcing changes of values of stop_requested,stop_possiblei.e. this should say something like:
Initializes prom.token and prom.source such that at any point before asynchrous operation associated with *this completes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the wording, let me know what you think.
Co-authored-by: timsong-cpp <rs2740@gmail.com>
Co-authored-by: timsong-cpp <rs2740@gmail.com>
|
@jwakely do you mind merging it before today telefon? |
No description provided.