Skip to content

[2025-06 LWG Motion 34] P3552R3 Add a Coroutine Task #8032

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

dietmarkuehl
Copy link
Contributor

@dietmarkuehl dietmarkuehl commented Jun 29, 2025

I have applied the changes for P3552r3 (Add a Coroutine Task Type). Compared to the actual text of P3552r3
I made some [I think editorial] changes:

  • added with_error and change_coroutine_scheduler declarations to the synopsis before task; they are in the detailed description but not in the synopsis (possibly they should only be in the synopsis) as there is no further description)
  • inconsistent default template arguments for the ctor in the class declaration (allocator and the later description (allocator); the wording consistently uses allocator
  • added "of the" to a sentence about the type of a completion datum: "... defines the type of the value completion datum"
  • the use of the template parameter of the nested type state is Rcvr which has two problems: 1. the ctor also uses the name Rcvr for its template parameter 2. the class stores an object of type R which is the receiver named rcvr the most logic fix is to use Rcvr consistently for the state and change the name for the ctor's parameter:
    1. change the ctor template parameter type to use R
    2. change the member to use Rcvr
    3. change the type R used for the own-env-t to be "...get_env(declval())..."

Fixes #7971
Fixes cplusplus/papers#2200

@jensmaurer jensmaurer changed the title FIXES: 7971 [2025-06 LWG Motion 34] P3552R3 Add a Coroutine Task [2025-06 LWG Motion 34] P3552R3 Add a Coroutine Task Jun 30, 2025
Copy link
Member

@Eisenwave Eisenwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for drafting this up.

Lots of work required before this is ready to go.

Also note that fixing up CI builds is not a fixup commit; it should just go into the main commit. The point of fixups is just to distinguish between turning the paper into TeX, and fixing typos and other minor issues afterwards.

Massaging whitespace or paragraph justification is not a separate commit.

source/exec.tex Outdated
Comment on lines 5697 to 5700
\tcode{affine_on} adapts a sender into one that completes on
the specified scheduler. If the algorithm determines that the adapted
sender already completes on the correct scheduler it can avoid any
scheduling operation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository uses semantic line breaks (https://sembr.org/). I don't want to bother you too much, but please put new sentences on a separate line at least. That is, newline after ..

Note that the TeX still renders the same whether you put a space or a newline into the source.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the text to have each sentence start on a new line (in this commit)

@jensmaurer
Copy link
Member

@Eisenwave and @dietmarkuehl , let me recap the general rules for paper pull requests, and their rationale.

  • We generally do not want force-pushes during paper application, because that might impede in-flight review. (We're fine with / encourage force-pushes for non-paper pull requests.)
  • Any commit prefixed by "fixup" in the title will be squashed when @tkoeppe merges the pull request. These are the kind of commits that should appear when you've forgotten to apply a change in the incoming paper. Obviously, we don't want to keep this for posterity. Having a separate commit also helps with "look, I've really fixed that". Since this will be squashed, the commit description doesn't matter a lot (of course, it should be readable).
    For example, "fixup: add indexing" is a perfectly fine commit title here (provided the contents is related to the title). Or "fixup: avoid overfull hboxes".
  • Punctuation fixes (Oxford comma, after bullets, after subordinate clauses etc.) should be done silently in the original commit, or as a "fixup" later (if you notice punctuation issues after creating the pull request).
  • More involved, but still "obviously editorial" fixes should be mentioned in the original commit description, e.g. "dissolved lone subclause X" or "marked exposition-only identifiers"
  • Anything beyond that warrants a separate, proper editorial commit in the usual format "[sub.clause.label] What is changed".

Adding cross-references to definitions of terms is probably in the "obviously editorial" area, but requires a check whether the xref is pointing to the right place (and thus is putting additional burden on the reviewers). Having a separate, proper editorial commit "[sub.clause.label] Add cross-references to term definitions" would be a bit more transparent, and clearly differentiates paper content from add-on editorial fixes. Occasionally, cross-references are normative (we mean exactly those situations), and changing / amending them would not be editorial.

Hope that helps.

@dietmarkuehl
Copy link
Contributor Author

I believe I have addressed all comments which were raised so far. Please let me know when I need to do more changes.

Thank you very much for the review!

@tkoeppe tkoeppe force-pushed the motions-2025-06-21-lwg-34 branch from 5df4a38 to 3414b7e Compare July 17, 2025 00:03
@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 17, 2025

I've squashed the fixups and rebased the branch so it's now in its final position.

source/exec.tex Outdated
@@ -7877,3 +7909,871 @@
The storage referenced by \tcode{s} may be used by \tcode{*this}
as temporary storage for the duration of the operation launched by this call.
\end{itemdescr}

\rSec2[exec.affine.on]{\tcode{execution::affine_on}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dietmarkuehl I'm assuming this material is meant to go under "Coroutine utilities" (which happened to be at the end of [exec] prior to this meeting), rather than under "Namespace system_context_replaceability".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changed location is the result of a previous rebase, I guess. Is there something I should do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I've got it. It was just that the edit instructions were not literally true ("at the end of [exec]" should instead of named the subclause at whose end you wanted it), so I mainly just want to confirm that I understood the intention.

@tkoeppe tkoeppe force-pushed the motions-2025-06-21-lwg-34 branch from 3414b7e to 79d1725 Compare July 17, 2025 11:03
Editorial notes:

- the new subclauses are appended at the end of [exec.coro.util],
  not at the end of [exec] as the paper says

- inconsistent default template arguments for the ctor
  in the class declaration (allocator<byte> and the later description
  (allocator<void>); the wording consistently uses allocator<void>

- added "of the" to a sentence about the type of a completion datum:
  "... defines the type *of the* value completion datum"

- the use of the template parameter of the nested type state is Rcvr
  which has two problems:
    1. the ctor also uses the name Rcvr for its template parameter
    2. the class stores an object of type R which is the receiver
       named rcvr
  the most logic fix is to use Rcvr consistently for the state and
  change the name for the ctor's parameter:
    1. change the ctor template parameter type to use R
    2. change the member to use Rcvr
    3. change the type R used for the own-env-t to be
       "...get_env(declval<Rcvr>())..."
The definitions of with_error and change_coroutine_scheduler are now
in the main <execution> synopsis. They have no further description.
@tkoeppe tkoeppe force-pushed the motions-2025-06-21-lwg-34 branch from 79d1725 to c557f21 Compare July 17, 2025 12:03
@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 17, 2025

Thanks a lot for this, Dietmar! Very nice drafting!

@tkoeppe tkoeppe merged commit 91a7dfa into cplusplus:main Jul 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2025-06 LWG Motion 34] P3552R3 Add a Coroutine Task Type P3552 R2 Add a Coroutine Task Type
4 participants