All awaitables are implicitly typed senders#172
Conversation
660927a to
d93c694
Compare
|
@lewissbaker For the record, I don't believe this prevents us from coming to LEWG with a |
|
We can specialise for std::task, I can see that. I am wondering though if the right default here should be to repost on get_scheduler(r) or to call inline? If we can transitioning from an arbitrary awaitable to an arbitrary sender, should we switch scheduler for safety, or call inline for efficiency? |
|
I feel that if folks want to start the awaitable on a particular execution context, they can use the Edit: oh, you're probably talking about on resumption. If the awaitable resumes on a different context, what should happen? I'm less certain about that. Edit 2: If we wanted to reschedule on resume, I think we'd need to standardize something like |
|
Correct, I'm thinking about resumption. We can standardise an algorithm to do that, and it need not be a coroutine one, it could just be the equivalent of Fundamentally though the question is what the right default here is. It's possible that coroutines are no different from a situation like:
in which case the algorithm solution works whether s is an awaitable or not:
or it's possible that coroutines are a bigger concern because the way people write code makes them more prone to accidental deadlock from inline resumption of children. |
…-senders All awaitables are implicitly typed senders e857b0a
I think this demonstrates that we should update P2300 to make
execution::connectandexecution::sender_traitship to awaitables.