cplusplus / papers

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

P0443 A Unified Executors Proposal for C++ #102

Closed jensmaurer closed 3 years ago

jensmaurer commented 5 years ago

P0443R9 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, H. Carter Edwards, Gordon Brown)

jensmaurer commented 5 years ago

Discussed in joint LEWG / SG1 session in San Diego: http://wiki.edg.com/bin/view/Wg21sandiego2018/P0443R9 .

The SG1 design of P0443 is ready for inclusion in C++20, we forward P0443 to LEWG for design review (Wording for LWG pending).

SF F N A SA
8 16 1 7 0
jensmaurer commented 5 years ago

P0443R10 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, H. Carter Edwards, Gordon Brown, Daisy Hollman)

ogiroux commented 5 years ago

SG1 poll: "If P0443 is adopted in the IS, the papers P1322R0 and P0958R1 should be applied to the draft of the Networking TS prior to adopting the TS wording into the IS or future TS ." Unanimous consent.

wg21bot commented 5 years ago

P0443R11 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, Carter Edwards, Gordon Brown, Daisy Hollman, Lee Howes, Kirk Shoop, Eric Niebler)

ogiroux commented 5 years ago

We adopt the design of P0443R11 for ship vehicle TBD (i.e. new papers should be written assuming it is the basline they build upon or modify): SF F N A SA 17 17 1 0 0 Unanimous consent

We recommend the design of P0443R11 for C++23. SF F N A SA 14 8 6 5 1 SA: still too new and are missing experience with a lot of use-cases Consensus

ogiroux commented 5 years ago

SG1 in Belfast.

wg21bot commented 4 years ago

P0443R12 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, Carter Edwards, Gordon Brown, Daisy Hollman, Lee Howes, Kirk Shoop, Lewis Baker, Eric Niebler)

tituswinters commented 4 years ago

Discussed in Prague

We approve of the design and want to review details and wording in Varna. SF F N A SA 22 12 6 0 0

ogiroux commented 4 years ago

SG1 in Prague.

Expecting wording ready for review in Varna.

jensmaurer commented 4 years ago

P0443R13 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, Carter Edwards, Gordon Brown, Daisy Hollman, Lee Howes, Kirk Shoop, Lewis Baker, Eric Niebler)

wg21bot commented 4 years ago

P0443R14 A Unified Executors Proposal for C++ (Jared Hoberock, Michael Garland, Chris Kohlhoff, Chris Mysen, H. Carter Edwards, Gordon Brown, David Hollman)

brycelelbach commented 4 years ago

2020 Summary Library Evolution Review

2020-06-29 and 2020-07-07 Library Evolution Review

2020-06-29 and 2020-07-07 Library Evolution Minutes - D2202R0 Executors Review Report: Sender/Receiver Concepts

Chair: Nevin Liber and Fabio Fracassi

Champion: Gašper Ažman

Minute Taker: Ben Craig

2020-07-07 Library Evolution Minutes - D2203R0 Executors Review Report: Customization Points

Chair: Fabio Fracassi

Champion: Ryan McDougall

Minute Taker: Ben Craig

Summary

We reviewed D2022R0 Sender/Receiver Review Report and D2203R0 Customization Point Report The Sender/Reciever report will be compiled into concrete questions to be polled at a later date.

POLL: We want to make the selection of Executor <-> Scheduler interoperation adapters more explicit and not provide implicit defaults (esp. setting terminate as the error channel when calling the execute cpo). Given the history of the consensus of R0443 this would need a paper.

Strongly For Weakly For Neutral Weakly Against Strongly Against
2 16 5 2 1

SA: The poll was taken without the primary dissenter

Attendance: 27

# of Authors: 8

Outcome

This and the previous session were mostly informational, to identify open questions and make sure that we properly understand the programming model that we are integrating with Executors and Sender/Receivers.

One outcome is that we need lots of additional documentation and examples to make informed decisions, since the programming model (and the domain) is complex. Also to evaluate the proposed concepts we need to understand the algorithms in P1897 or P1898.

Most open issues we discovered seem to be at the seams and interactions between the two models Sender/Receiver and Executors, especially in the way that errors and cancelations are propagated between the two models.

2020-07-21 Library Evolution Review

2020-07-21 Library Evolution Minutes - P2207R0 Executors Review Report: Executor Concept

Chair: Nevin Liber

Champion: Guy Davidson

Minute Taker: Ben Craig

Outcome

The executors proposal needs to collect the history behind the decisions and put it in one place. It is impossible to do a design review w/o the knowledge of how we got here.

Executor type traits: do we want traits bundled into a few large-ish classes that users specialize, or do we want many small-ish classes instead? As this applies to more than just executors, authors and participants want guidance from LEWG. No one has yet volunteered to write such a paper.

Shape concept: We shouldn't have it yet, as it isn't generic (size_t), we don't have algorithms that use it.

Swapping executors (exceptions, thread safety, etc.): it turns out they currently are not required to be assignable, so not swappable, but that may just be an oversight. Authors will revisit this.

Namespace execution being too long: no suggestions; authors can (as always) come up with other alternatives and present them if they should so choose.

2020-07-27 and 2020-08-04 Library Evolution Review

2020-07-27 and 2020-08-04 Library Evolution Minutes - P2183R0 Executors Review Report: Properties

Chair: Ben Craig and Billy Baker

Champion: David Olsen

Minute Taker: Inbal Levi

Summary

The following poll was taken regarding RTTI overhead from any_executor<P...>::target_type (section 5.6 of P2183 Executor Review: Properties).

POLL: We should remove any_executor<P...>::target_typ.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
3 4 7 0 0

Attendance: 28

# of Authors: 2

Author Position: neutral

Outcome

We had consensus for removing target_type from any_executor to eliminate RTTI-related overhead. This removal is consistent with recent decisions to not include target/target_type in any_invocable (see the discussion of P0288 any_invocable from San Diego 2018). P1322 Networking TS enhancement presents a case for using target_type. The authors of P0433R13 are encouraged to explore the properties approach shown in P2183 as well as other alternatives such as the unchecked any_cast possibility raised during the presentation of P2183.

2020-08-18 Library Evolution Review

2020-08-18 Library Evolution Minutes - P2205R0 Executors Review Report: Polymorphic Executor

Chair: Fabio Fracassi

Champion: Inbal Levi

Minute Taker: Ben Craig

2020-08-24 Library Evolution Review

2020-08-24 Library Evolution Minutes - P2206R0 Executors Review Report: Thread Pool

Chair: Nevin Liber

Champion: Ruslan Arutyunyan

Minute Taker: Ben Craig

brycelelbach commented 4 years ago

2020 Fall Library Evolution Review Summary and 2020 Fall Poll Preparation

2020-09-21 Library Evolution Minutes - Review Summary and 2020 Fall Poll Preparation 2020-09-29 Library Evolution Minutes - Review Summary and 2020 Fall Poll Preparation 2020-10-13 Library Evolution Minutes - Review Summary and 2020 Fall Poll Preparation 2020-10-19 Library Evolution Minutes - Review Summary and 2020 Fall Poll Preparation

Chair: Bryce Adelstein Lelbach

Minute Taker: Ben Craig and Inbal Levi

brycelelbach commented 4 years ago

2020 Fall Final Pre Poll Discussion

2020-10-22 Library Evolution Telecon Minutes - Final Pre 2020 Fall Polls Discussion

Chair: Bryce Adelstein Lelbach

Minute Taker: Ben Craig

Start Ruslan's Presentation: 2020-10-22 13:03 Pacific

End Ruslan's Presentation, Start Review of Executors Polls: 13:19

These polls will not be reworded unless there are grave errors; the poll wording has been circulating for two weeks, and we don't want to make last minute changes.

"Remove" polls (2 and 3): These things require effort to review and to specify, and aren't necessarily fundamental. I want to determine how strongly we feel about keeping them in the core proposal.

End Review of Executors Polls: 13:55

SUMMARY: A brief presentation was given by on the relationship of schedulers and executors in P0443 by Ruslan Arutyunyan. A discussion of possible ways of unifying schedulers and executors followed. Ultimately, this discussion was tabled after it was pointed out that this had been attempted for years in SG1 and that we would need a well-thought concrete proposal to have a productive discussion on this. We then reviewed the executor polls intended for the 2020 Fall Library Evolution polling period. No major issues or concerns with the polls were identified.

OUTCOME: We will commence 2020 Fall Library Evolution polling as planned.

brycelelbach commented 3 years ago

2020 Fall Library Evolution Polls

P2262: 2020 Fall Library Evolution Poll Outcomes

POLL 0: Remove implicit adaptation from P0443R14 (Executors) by applying P2235R0 to P0443R14, which will make schedule only take schedulers, make execute only take executors, make sender and receiver operations like connect only take senders and receivers, and add explicit adaptation from executor to scheduler (make_scheduler_from_executor) but not vice versa.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
21 15 0 0 0

Outcome: Unanimous consensus in favor.

POLL 1: Use one class for each individual trait instead of combined traits classes (sender_traits, etc) in P0443R14 (Executors).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
7 7 7 5 2

Outcome: No consensus.

POLL 2: Remove static_thread_pool from P0443R14 (Executors). It may be pursued in a follow-on proposal.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 11 4 7 2

Outcome: Weak consensus in favor.

POLL 3: Remove any_executor from P0443R14 (Executors). It may be pursued in a follow-on proposal.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
10 9 4 4 2

Outcome: Consensus in favor.

POLL 4: Remove any_executor::target and any_executor::target_type from P0443R14 (Executors).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
12 10 4 2 0

Outcome: Consensus in favor.

POLL 5: P0443R14 (Executors) is sufficiently mature that we should aim to ship it in C++23.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
10 12 7 10 1

Outcome: Weak consensus in favor.

Outcome

Revise P0443R14 (Executors) as follows and return to Library Evolution for further review:

We will continue on our planned course of aiming to ship P0443R14 (Executors) in C++23, but a notable minority in Library Evolution are not convinced that P0443R14 (Executors) is sufficiently mature. Library Evolution wants to see more field experience with P0443R14 (Executors). P0443R14 (Executors) authors and advocates should take note of this. Focus on demonstrating field experience through implementations and usage, improving introductory material, minimizing the scope, resolving outstanding minor open issues, and developing wording to increase Library Evolution confidence in the maturity of P0443R14 (Executors).

We encourage a separate follow-on proposal exploring individual traits versus combined traits classes in general, using P0443R14 (Executors) as an example to gauge impact.

brycelelbach commented 3 years ago

Closing as we are preceding with P2300, as per the discussion at the 2021-08-03 Library Evolution telecon.