Skip to content
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

P0876 R16 fiber_context - fibers without scheduler #117

Open
jensmaurer opened this issue Jan 26, 2019 · 32 comments
Open

P0876 R16 fiber_context - fibers without scheduler #117

jensmaurer opened this issue Jan 26, 2019 · 32 comments
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 concurrency coroutines Coroutines / Fibers CWG Core EWG Evolution IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - large paper size estimate
Milestone

Comments

@jensmaurer
Copy link
Member

P0876R5 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@jensmaurer jensmaurer added this to the 2019-02 milestone Jan 26, 2019
@jensmaurer jensmaurer added SG1 Concurrency coroutines Coroutines / Fibers labels Jan 26, 2019
@ogiroux ogiroux added this to Wednesday in SG1KonaFeb2019 Feb 14, 2019
@ogiroux ogiroux moved this from Wednesday to Friday in SG1KonaFeb2019 Feb 17, 2019
@jensmaurer
Copy link
Member Author

SG1 in Kona

@wg21bot
Copy link
Collaborator

wg21bot commented Jun 23, 2019

P0876R6 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@wg21bot wg21bot added this to the 2019-07 milestone Jun 23, 2019
@ogiroux ogiroux added this to Wednesday in SG1 in Cologne 2019 Jul 13, 2019
@ogiroux ogiroux moved this from Wednesday to Monday in SG1 in Cologne 2019 Jul 13, 2019
@ogiroux
Copy link
Collaborator

ogiroux commented Jul 19, 2019

When a non-empty fiber_context is destroyed...

...we like the previous version of the paper (R5+fixes?).
SF F N A SA
0 4 9 7 1

...we like the paper as proposed (R6).
SF F N A SA
1 0 3 10 9

...we like the paper changed to UB (so the user has to do it all).
SF F N A SA
1 12 6 3 1

...we like the paper changed to invoke a function (in that fiber).
SF F N A SA
6 9 9 0 0 - Increases consensus

The cancellation function should have a default in the TS
SF F N A SA
0 2 4 17 2

@ogiroux
Copy link
Collaborator

ogiroux commented Jul 19, 2019

After the following changes are applied...

  • change ~fiber_context and operator=() to have "requires: is empty" instead of cancelling
  • add cancel() and cancel_from_any_thread() that calls the cancellation function if not empty
  • replace thread termination when returning an empty fiber_context, with UB
    ...the SG1 design of fiber_context is ready for a TS vehicle
    SF F N A SA
    3 7 0 0 0

We need more SG1 wording review before merging into a TS
SF F N A SA

  • Unanimous consent

@wg21bot
Copy link
Collaborator

wg21bot commented Aug 23, 2019

P0876R8 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@wg21bot wg21bot modified the milestones: 2019-07, 2019-11 Aug 23, 2019
@wg21bot
Copy link
Collaborator

wg21bot commented Oct 15, 2019

P0876R9 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@theres-waldo theres-waldo added the EWGI Evolution Incubator label Oct 28, 2019
@theres-waldo
Copy link
Collaborator

Based on discussion with JF, this should get language review, and it should start with EWG-I.

@ogiroux ogiroux added this to Thursday in SG1Belfast2019 Nov 3, 2019
@ogiroux ogiroux moved this from Thursday to No planned discussion in SG1Belfast2019 Nov 3, 2019
@theres-waldo
Copy link
Collaborator

EWG-I in Belfast

P0876R9 is ready to bring to EWG as it stands.
SF / F / N / A / SA
2 / 8 / 2 / 1 / 0

@theres-waldo theres-waldo added EWG Evolution and removed EWGI Evolution Incubator labels Nov 7, 2019
@jfbastien jfbastien added this to Friday in EWGBelfast2019 Nov 7, 2019
@theres-waldo
Copy link
Collaborator

(EWG-I did suggest adding a section to the paper to discuss some of the issues that came up, such as TLS and and saving the floating-point state. However, given the poll, I forwarded the paper to EWG without blocking on that revision.)

@jfbastien
Copy link
Collaborator

This was seen by EWG in Belfast, will see again.

@inbal2l
Copy link
Collaborator

inbal2l commented Nov 16, 2023

P0876R14 was added to LEWG 2023 December electronic poll paper (P30532R0)
(Please note that any design changes should be forwarded via LEWG, preferably, in a separate paper)

@inbal2l inbal2l added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Nov 16, 2023
@jfbastien
Copy link
Collaborator

I'm told by Hubert that CWG asks for EWG input on the following:

As for the language evolution side, questions include whether a throw; lexically in the "body" of a handler should be allowed to rethrow an exception other than the one that became the currently handled exception when the handler became active. It seems LEWG was of the opinion that std::rethrow_exception(std::current_exception()) in a similar context should be allowed to rethrow such an other exception. The core language design and the library design require synchronization here. I am not aware of EWG having discussed this question. The last reference I found of exceptions in EWG discussion of fibers was a very long time ago. The more general question is whether there should be a per-fiber exception state.

See notes: https://wiki.edg.com/bin/view/Wg21kona2023/CoreWorkingGroup

@jfbastien jfbastien added the EWG Evolution label Jan 6, 2024
@jensmaurer
Copy link
Member Author

jensmaurer commented Jan 6, 2024

I agree this is an open question for EWG, although we might hit other corners that need EWG input once the paper has been properly drafted according to the feedback we gave. In other words, feel free to get an EWG response to this particular question at your earliest convenience, but don't be disappointed if the paper comes back to EWG anyway at some later point.

@inbal2l
Copy link
Collaborator

inbal2l commented Jan 6, 2024

As P0876R14 is currently been polled in Dec 2023 LEWG electronic poll (to be forwarded to LWG), CCing my response from the LEWG mailing list (Dec 24th: https://lists.isocpp.org/lib-ext/2023/12/26286.php).
To summarize from LEWG's perspective: I believe we can move forward with the current LEWG-requested design, and have EWG/Core give their input when possible. If EWG/Core gives contradicting input/brings up issues, LWG can send it back to us.

@inbal2l
Copy link
Collaborator

inbal2l commented Jan 17, 2024

P0876R14 was forwarded to LWG on LEWG 2023 December electronic poll (P3054R0)

@inbal2l inbal2l added LWG Library lwg-pending LWG Chair needs to disposition and removed LEWG Library Evolution ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Jan 17, 2024
@wg21bot
Copy link
Collaborator

wg21bot commented Feb 16, 2024

P0876R15 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Feb 16, 2024
@wg21bot wg21bot modified the milestones: 2023-telecon, 2024-telecon Feb 16, 2024
@wg21bot wg21bot changed the title P0876 R14 fiber_context - fibers without scheduler P0876 R15 fiber_context - fibers without scheduler Feb 16, 2024
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Feb 19, 2024
@jensmaurer jensmaurer moved this from Ready for review to Awaiting updated wording in CWG Mar 18, 2024
@jensmaurer
Copy link
Member Author

CWG 2024-03-18: Reviewed; needs updates.

@jensmaurer jensmaurer added the needs-revision Paper needs changes before it can proceed label Mar 18, 2024
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Mar 18, 2024
@jensmaurer jensmaurer moved this from Ready for review to Awaiting updated wording in CWG Mar 21, 2024
@jensmaurer
Copy link
Member Author

CWG 2024-03-21: Reviewed partially.

CWG asks EWG to reconsider the decision to permit implementations with per-thread (as opposed to per-fiber) exception state. Examples of surprise results have been added to the paper. Possible outcomes are to specify a per-fiber exception state, to require implementations to satisfy the existing rules around exceptions without actually requiring separate exception states, or to document the situations with bad outcomes as undefined behavior.

@wg21bot
Copy link
Collaborator

wg21bot commented Apr 17, 2024

P0876R16 fiber_context - fibers without scheduler (Oliver Kowalke, Nat Goodspeed)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Apr 17, 2024
@wg21bot wg21bot changed the title P0876 R15 fiber_context - fibers without scheduler P0876 R16 fiber_context - fibers without scheduler Apr 17, 2024
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Apr 19, 2024
@jensmaurer jensmaurer moved this from Ready for review to Awaiting updated wording in CWG Apr 19, 2024
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 concurrency coroutines Coroutines / Fibers CWG Core EWG Evolution IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - large paper size estimate
Projects
Status: In Progress
CWG
Ready for review
Development

No branches or pull requests