Skip to content

[task.promise, coro.generator.members] Consistently use "coroutine state" - #9391

Open
Cra3z wants to merge 1 commit into
cplusplus:mainfrom
Cra3z:replace-coroutine-frame
Open

Cra3z wants to merge 1 commit into
cplusplus:mainfrom
Cra3z:replace-coroutine-frame

Conversation

@Cra3z

@Cra3z Cra3z commented Nov 16, 2026

Copy link
Copy Markdown

Fixes #9390

Previously, we used "coroutine frame" as a synonym of term "coroutine state" defined in [dcl.fct.def.coroutine]. It is better to consistently use the defined term.

@jensmaurer

Copy link
Copy Markdown
Member

Hm...

"coroutine state" is defined as:

An implementation may need to allocate additional storage for a coroutine. This storage is known as the
coroutine state ...

So, coroutine state is storage. You can't really destroy storage, you can destroy only objects.

On the other hand, we already say in p11

The coroutine state is destroyed when ...

which is already non-sensical. So, we should apply this patch and add a core language patch that explains what "destroy the coroutine state" actually means.

@jensmaurer jensmaurer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jwakely , any concerns here?

@jwakely jwakely left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No concerns from me, but I agree with your suggested follow-up.

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.

[exec.task], [coro.generator] Coroutine State VS Coroutine Frame

3 participants