Re: PHP True Async RFC Stage 4
| From: | Edmond Dantes | Date: | Thu, 16 Oct 2025 07:28:13 +0000 |
| Subject: | Re: PHP True Async RFC Stage 4 | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128849@lists.php.net to get a copy of this message | ||
The quotes you provided were not my arguments.
1. There is an
await() function. This function has a cancellation
token that allows limiting its lifetime.
2. There is a Scope. It is undesirable to wait on the Scope without
an explicit limit, because while waiting, a reference to it is held,
and if the tasks within the Scope contain an error, the application
ends up in an undefined state.
3. However, if the developer explicitly defines a contract that limits
the lifetime using a cancellation token, such an operation becomes
safe.
4. But in await(), the cancellation token is an optional parameter.
Is that clear?