Does this actually fit in with php's execution model of each request
being a separate thread / process? As far as I understand this kind of
async programming is only useful within an event-loop architecture as
used by nodejs for example. There are things that do this for php like
ReactPHP, but it is not how the language usually gets used, at least
now. Making this really useful would probably entail changing the
execution model to one where requests are handled by long running
processes.

On Sun, 22 Dec 2019 at 20:59, Aran Reeks <cdtre...@gmail.com> wrote:
>
> Hi Internals,
>
> Since the start of PHP 7, we've seen some amazing performance improvement
> version by version as a result of core updates.
>
> Now some of the biggest wins have been implemented (with JIT due for PHP
> 8), I'd personally love to see support for Async / Await introduced in
> PHP's as a core language feature too.
>
> Being able to perform tasks in parallel such as reading or writing to DB,
> cache, queues... Would be a massive advantage and the performance gains
> from it could be really exciting!
>
> Looking at how Hack has implemented support, this seems like it could be a
> great start for a RFC, what does everyone else think?
>
> Here's a link to Hack's implementation for reference:
> https://docs.hhvm.com/hack/asynchronous-operations/some-basics
>
> Thoughts welcome from everyone.
>
> Cheers,
> Aran

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to