cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
665 stars 18 forks source link

P0876 R18 fiber_context - fibers without scheduler #117

Open jensmaurer opened 5 years ago

jensmaurer commented 5 years ago

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

jensmaurer commented 5 years ago

SG1 in Kona

wg21bot commented 5 years ago

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

ogiroux commented 5 years ago

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 commented 5 years ago

After the following changes are applied...

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

wg21bot commented 5 years ago

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

wg21bot commented 5 years ago

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

theres-waldo commented 5 years ago

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

theres-waldo commented 5 years ago

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 commented 5 years ago

(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 commented 4 years ago

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

wg21bot commented 4 years ago

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

jfbastien commented 4 years ago

EWG Prague, Wednesday afternoon:

Needs to be updated to list the questions which the TS is going to answer.

Please gather whatever other questions need to be answered for a TS, both from Library and Language perspectives.

We’d like to see this again for consideration into a TS. SF F N A SA
7 11 6 1 0
wg21bot commented 2 years ago

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

jensmaurer commented 2 years ago

This has a library-looking interface; adding LEWG.

brycelelbach commented 2 years ago

Removing Library Evolution. There are still open directional questions from Evolution. Those need to be settled first.

erichkeane commented 2 years ago

Forward P0876R11 to LEWG for consideration for C++26.

SF F N A SA
2 3 3 0 0

Result: No strong consensus, but no objection. Forward to LEWG, with no recommendations for/against ship vehicle.

RobertLeahy commented 1 year ago

2023-02-09 15:30 to 17:30 Issaquah Library Evolution Meeting

P0876R12: fiber_context

2023-02-09 15:30 to 17:30 UTC-8 Issaquah Library Evolution Minutes

Champion: Nathaniel Goodspeed (IP)

Chair: Robert Leahy (IP) & Bryce Adelstein Lelbach (IP)

Minute Taker: Steve Downey (IP)

__POLL: We are willing to proceed with fiber_context even if it cannot be resumed on multiple threads.__

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
6 10 2 0 0

Attendance: 22 (in person) + 7 (remote)

# of Authors: 1

Author Position: SF

Outcome: Strong consensus in favor

POLL: fiber_context should be default constructible.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 12 1 1 1

Attendance: 22 (in person) + 7 (remote)

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor

POLL: fiber_context should have explicit operator bool.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 8 3 6 1

Attendance: (in person) + (remote)

# of Authors: 1

Author Position: SF

Outcome: No consensus.

Robert Leahy to support Nathaniel Goodspeed on wording et cetera.

Next Steps

Return to Library Evolution with wording updated for additional precision and clarity on:

wg21bot commented 1 year ago

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

wg21bot commented 1 year ago

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

nliber commented 1 year ago

2023-06-12 Varna Library Evolution Meeting polls

P0876R13 fiber_context - fibers without scheduler

2023-06-12 Library Evolution Minutes

Chair: Nevin ":-)" Liber, Fabio Fracassi

Champion: Nat Goodspeed

Minute Taker: Guy Davidson

Summary

POLL: From P0876R13 we want to change can_resume() to a different name before forwarding to LWG.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
0 5 11 7 3

Attendance: 22 + 7

# of Authors: 1

Author Position: WA

Outcome: No consensus for change

POLL: Move the discussion of uncaught_exceptions() and current_exception() from P0876R13 to a new paper and specify in P0876 that it is unspecified to call them when more than one fiber is running in the current thread.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
5 13 6 1 0

Attendance: 25 + 5

# of Authors: 1

Author Position: WF

Outcome: Consensus

WA: going with this approach undermines the design point of fibers

POLL: Modify P0876R13 with the following changes and then forward to LWG for C++26 (to be confirmed by electronic polling): • It is unspecified to call uncaught_exceptions() and current_exception() when more than one fiber is running in the current thread. • Make the three parameter constructor of fiber_context implicit. • Add to the fiber_context assignment operator the following effect: If empty() returns false, invoke terminate ([except.terminate]). • Strike the precondition from the fiber_context assignment operator. • Allow throwing system_error as well as bad_alloc. • Delete the remark under can_resume() and leave the note.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 13 1 1 0

Attendance: 29 + 3

# of Authors: 1

Author Position: SF

Outcome: Consensus

WA: If the first bullet point says it documents existing practice, then their vote changes to WF

Next Steps

The authors will apply the changes requested on the first and second polls, and then P0876R14 of the paper (including the changes) will be voted on in the next electronic poll.

wg21bot commented 1 year ago

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

JeffGarland commented 1 year ago

This paper has core wording in it -- the author is going to need to get on the core agenda.

jensmaurer commented 1 year ago

CWG 2023-11-09: Reviewed (full minutes); Needs pervasive updates to properly disentangle "thread of execution" (is concurrent and has unique instance of thread-local storage) from "fiber" (has flow of control) throughout the standard.

inbal2l commented 1 year ago

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)

jfbastien commented 10 months ago

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

jensmaurer commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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

wg21bot commented 9 months ago

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

jensmaurer commented 8 months ago

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

jensmaurer commented 8 months ago

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 commented 7 months ago

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

jfbastien commented 4 months ago

Seen in EWG in St Louis:

Poll: P0876R16 — fiber_context - fibers without scheduler, change the paper to track exceptions on a per-fiber basis rather than leaving it implementation-defined.

| SF | F | N | A | SA | | 6 | 8 | 3 | 0 | 0 |

Consensus.

Poll: P0876R16 — fiber_context - fibers without scheduler, forward the paper, with modification to track exceptions on a per-fiber basis, to CWG for inclusion in C++26.

| SF | F | N | A | SA | | 3 | 2 | 5 | 6 | 3 |

No consensus, would like to see implementation experience before forwarding.

wg21bot commented 4 months ago

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

jensmaurer commented 4 months ago

Unassigning CWG, since EWG wants to see implementation experience.

wg21bot commented 1 month ago

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

JeffGarland commented 1 month ago

LWG spent several sessions on this paper in St Louis (not to mention Tokyo and others). We are close to done with wording review, but now that the paper is going back to other groups we won't take our last pass on this until it's cleared those groups.

jfbastien commented 1 day ago

Seen in EWG on Thursday, Gor had concerns on Microsoft platforms because the exceptions live on the stack, Gor committed to review concerns internally to Microsoft and come back with feedback before the next meeting so that authors can know how to proceed.