Will PHP ever have this? That would certainly be very
interesting to have, the option to just push away a bigger task.
I'm not sure implementing an event loop in core really jives with PHP's
primary intentions, so I personally don't think it makes much sense to
consider something like this.
That said, you can absolutely implement this yourself right now in userland
using tools like pecl/libevent, pecl/ev or even your own custom userland
loop via stream_select()
. There are many people doing this quite
successfully already and using the available extension it's possible to
write non-blocking event-looped applications that are every bit as
performant as node.js.
Hi,
Le 25 févr. 2014 à 18:11, Daniel Lowrey rdlowrey@php.net a écrit :
That said, you can absolutely implement this yourself right now in userland
using tools like pecl/libevent, pecl/ev or even your own custom userland
loop viastream_select()
. There are many people doing this quite
successfully already and using the available extension it's possible to
write non-blocking event-looped applications that are every bit as
performant as node.js.
There’s http://reactphp.org/ for example.
Completely aggree that there’s already pecl/libevent and pecl/ev for that. It’s a userland job or eventually a pecl/ext if necessary.
Regards,
Bruno