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?
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_awaiton anintwhenawait_transformis suitably defined in your promise type.The implementation of
taskalready assumes thatawait_readyandawait_resumeare present. But is normal (single-argument)await_suspendneeded?taskdoesn't need it,IoAwaitablewill always be called via a wrapper. But without it, it is not a normal Awaitable.Question: does
IoAwaitableneed to be something that I canco_awaiton directly?I heard the idea that
IoAwaitablewill be replaced withAwaitSender. If this shuold be the case, when I do not implement the sender-specific things, am I still modellingAwaitSender?