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

Implement P0443/P1897/P2300 #5045

Open
msimberg opened this issue Nov 6, 2020 · 7 comments
Open

Implement P0443/P1897/P2300 #5045

msimberg opened this issue Nov 6, 2020 · 7 comments

Comments

@msimberg
Copy link
Contributor

msimberg commented Nov 6, 2020

This is a tracking issue for the new and improved P0443 (previous issue was here: #2439). As with the previous issue, things are still in progress, so we can't really go all in yet, but we can explore things and see what changes are required.

I'm starting this by collecting the relevant proposals here:

Implementations:

Bulk execution discussion:

Related PRs:

@msimberg
Copy link
Contributor Author

msimberg commented Nov 6, 2020

I have local changes to add the remaining CPOs defined in P0443, and some basic senders/receivers that work on our thread pools. I'll be opening a PR next week...

@msimberg msimberg changed the title Implement P0443 senders and receivers Implement P0443 and P1897 Mar 15, 2021
@aurianer aurianer added the category: senders/receivers Implementations of the p0443r14 / p2300 + p1897 proposals label May 6, 2021
@msimberg
Copy link
Contributor Author

Added P2300 (https://isocpp.org/files/papers/P2300R0.html) to the list. It combines P0443 and P1897 into a single paper and cleans up some rough edges.

@hkaiser
Copy link
Member

hkaiser commented Jun 25, 2021

Re P2300: here is a list of things that are changed compared to P0443 and P1897 (please update this list as needed):

There is a new concept of completion-schedulers that may be associated with a particular sender. Thus

General changes:

@hkaiser hkaiser pinned this issue Jul 9, 2021
@msimberg msimberg changed the title Implement P0443 and P1897 Implement P0443/P1897/P2300 Jul 29, 2021
@msimberg
Copy link
Contributor Author

The lazy/eager bifurcation was removed from a later revision. @hkaiser I've edited your comment to remove the lazy_ versions (the non-lazy_ versions are now always lazy).

@hkaiser
Copy link
Member

hkaiser commented Feb 22, 2022

This document adds more refinements to P2300 that need to be taken into account: P2532:

  • Remove the default implementation of the get_env receiver query.
  • The receiver_of concept takes a receiver and an instance of the completion_signatures<> class template.
  • A receiver’s customization of set_value is required to be noexcept.
  • The sender_to<Sndr, Rcvr> concept requires Rcvr to accept all of Sndr's completions.
  • connect(sndr, rcvr) also requires rcvr to accept all of sndr's completions.
  • get_completion_signatures is required to return an instantiation of the completion_signatures class template; the value_types_of_t and error_types_of_t template aliases remain unchanged.
  • The make_completion_signatures design is slightly tweaked to be more general.

@hkaiser
Copy link
Member

hkaiser commented Apr 25, 2022

Changes in P2300R5 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2300r5.html):

Fixes:

  • start_detached requires its argument to be a void sender (sends no values to set_value).

Enhancements:

  • Receiver concepts refactored to no longer require an error channel for exception_ptr or a stopped channel.
  • sender_of concept and connect customization point additionally require that the receiver is capable of receiving all of the sender’s possible completions.
  • get_completion_signatures is now required to return an instance of either completion_signatures or dependent_completion_signatures.
  • make_completion_signatures made more general.
  • receiver_adaptor handles get_env as it does the set_* members; that is, receiver_adaptor will look for a member named get_env() in the derived class, and if found dispatch the get_env_t tag invoke customization to it.
  • just, just_error, just_stopped, and into_variant have been respecified as customization point objects instead of functions, following LEWG guidance.

bors bot pushed a commit that referenced this issue May 26, 2022
5846: [execution] Add schedule_result_t alias template. r=hkaiser a=SAtacker

- Alias schedule_result_t gives the result type of schedule

Signed-off-by: Shreyas Atre <shreyasatre16@gmail.com>


## Any background context you want to provide?

- #5045 (comment)
- [X] I have added a new feature and have added tests to go along with it.
- [ ] I have fixed a bug and have added a regression test.
- [ ] I have added a test using random numbers; I have made sure it uses a seed, and that the random numbers generated are valid inputs for the tests.


Co-authored-by: Shreyas Atre <shreyasatre16@gmail.com>
@hkaiser
Copy link
Member

hkaiser commented Nov 29, 2022

There is also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants