Re: [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

From: Date: Mon, 27 Jun 2016 11:28:31 +0000
Subject: Re: [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-94273@lists.php.net to get a copy of this message
On 06/27/2016 02:05 PM, Pierre Joye wrote:
On Mon, Jun 27, 2016 at 5:08 PM, Joe Watkins <pthreads@pthreads.org> wrote:
Morning,
     How is the impact wider than ext/pcntl ?
The implementation is only in pctnl. The feature is used indirectly by the engine and makes it a core feature. Quote from the RFC: "Zend Engine in PHP 7.1 was extended with ability of safe time-out and interrupt handling. Actually, PHP VM checks for EG(vm_interrupt) flag on each loop iteration, user function entry or internal function exit, and call callback function if necessary. I propose to use this ability to implement asynchronous signal handling. Registered signal handlers are going to be called at some points during user script execution without any overhead." and the test: <?php ini_set("pcntl.async_signals", "1"); pcntl_signal(SIGTERM, function ($signo) { echo "Signal handler called!\n"; }); echo "Start!\n"; posix_kill(posix_getpid(), SIGTERM); $i = 0; // dummy echo "Done!\n"; It affects how signals are handled within the engine, obvioulsy. I have no doubt that this RFC will be accepted, by large, so it is not a big issue. However it does affect the engine so the 2/3 rule applies. We use 2/3 vote for "a feature affecting the language itself (new syntax for example)", not the engine internals.
https://wiki.php.net/RFC/voting#voting

« previous php.internals (#94273) next »