Re: PHP True Async RFC Stage 4

From: Date: Thu, 23 Oct 2025 11:08:27 +0000
Subject: Re: PHP True Async RFC Stage 4
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-128929@lists.php.net to get a copy of this message
Hello. It seems to me that the following solution balances the different viewpoints better: 1. Keep the base Awaitable interface, which defines an object that can be awaited. 2. Introduce a FutureLike interface that extends Awaitable. 3. Modify the await() function so that it only accepts FutureLike objects. 4. Functions such as awaitAll or awaitAny may need to be renamed, but that’s outside the scope of this RFC. 5. There will be no need to create a Future for functions designed to work with an Awaitable object — this keeps the select case syntax clean. **Naming issue** I see a certain inconsistency between await and Awaitable. It might be worth coming up with a better name for Awaitable. I remember that “Observable” was once suggested.

« previous php.internals (#128929) next »