Skip to content

Stiricter definition of IoAwaitable #356

Description

@akrzemi1

We need a more strict definition of concept IoAwaitable.
The intention appears to be that it is also an "awaitable" but "awaitable" is only an informal name, and tricky. Remember that you can co_await on an int when await_transform is suitably defined in your promise type.

The implementation of task already assumes that await_ready and await_resume are present. But is normal (single-argument) await_suspend needed? task doesn't need it, IoAwaitable will always be called via a wrapper. But without it, it is not a normal Awaitable.

Question: does IoAwaitable need to be something that I can co_await on directly?

I heard the idea that IoAwaitable will be replaced with AwaitSender. If this shuold be the case, when I do not implement the sender-specific things, am I still modelling AwaitSender?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions