On Thu, Oct 23, 2025, at 10:04, Edmond Dantes wrote:
> > Nowhere in the RFC does it explain how await() applies to the Awaitable 
> > interface, it only specifies it in the context of a coroutine.
> 
> Which aspect of the behavior is not described here?
> 
> RFC:
> 
> The Awaitable interface is a contract that allows objects to be used
> in the await expression.
> The Awaitable interface does not impose limitations on the number of
> state changes.
> In the general case, objects implementing the Awaitable interface can
> act as triggers — that is, they can change their state an unlimited
> number of times. This means that multiple calls to await <Awaitable>
> may produce different results.
> 

For example, it describes:

> `await` suspends the execution of the current coroutine until the awaited one 
> returns a final result or completes with an exception.

But it doesn't explicitely say that it happens for Awaitable. For all we know, 
it doesn't suspend anything unless the value given to it is a coroutine. Since 
Awaitable doesn't necessarily have a "final result" or "a single exception" we 
know it isn't about Awaitable, but about coroutines.

— Rob

Reply via email to