Skip to content

change specification of sender_traits and connect to make awaitables senders#178

Merged
ericniebler merged 5 commits intomainfrom
awaitables-are-senders
Sep 29, 2021
Merged

change specification of sender_traits and connect to make awaitables senders#178
ericniebler merged 5 commits intomainfrom
awaitables-are-senders

Conversation

@ericniebler
Copy link
Collaborator

refs #150

@ericniebler ericniebler force-pushed the awaitables-are-senders branch from 52a438c to da8d5c8 Compare August 24, 2021 22:39
Copy link
Collaborator

@griwes griwes left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me, though we should definitely have Lewis read through this as well.

template<template<class...> class Tuple, template<class...> class Variant>
using value_types = Variant<Tuple<>>;

template<template<class...> class Variant>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this the empty variant if the co_await expression is nothrow?

I know that the coroutine allocation might throw but that would throw out of connect, not through set_error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would be, if __get_awaiter is nothrow and all of the 3 awaiter members are nothrow? I'm not sure how to test if await_suspend throws without knowing the promise type. I don't think it's computable in library code.

@ericniebler ericniebler merged commit ea50864 into main Sep 29, 2021
@ericniebler ericniebler deleted the awaitables-are-senders branch September 29, 2021 19:43
github-actions bot pushed a commit that referenced this pull request Sep 29, 2021
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.

3 participants