[RFC] [Vote] Asynchronous Signal Handling

php.internals

Dmitry Stogov

10 years ago
Hi internals, The RFC has been moved into voting stage: https://wiki.php.net/rfc/async_signals Thanks. Dmitry.

Nikita Popov

10 years ago
On Tue, Jun 28, 2016 at 6:16 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> Hi internals, > > > The RFC has been moved into voting stage: > > > https://wiki.php.net/rfc/async_signals > > > Thanks. Dmitry. >
What about Bob's suggestion to add a flag (for disabling async signals) to pcntl_signal() instead of having a global option? In any case, imho the default for this should be on, not off. Default "on" matches the PHP 5 behavior better than "off". Nikita

Dmitry Stogov

10 years ago
pcntl.async_signals=0 leads to exactly the same behavior as it was in 5.* and 7.0. Allow manual handling and using TICKs. pcntl.async_signals=1 - new behavior with interrupts. Thanks. Dmitry. ________________________________ From: Nikita Popov <nikita.ppv@gmail.com> Sent: Tuesday, June 28, 2016 19:41 To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] [Vote] Asynchronous Signal Handling On Tue, Jun 28, 2016 at 6:16 PM, Dmitry Stogov <dmitry@zend.com<mailto:dmitry@zend.com>> wrote: Hi internals, The RFC has been moved into voting stage: https://wiki.php.net/rfc/async_signals Thanks. Dmitry. What about Bob's suggestion to add a flag (for disabling async signals) to pcntl_signal() instead of having a global option? In any case, imho the default for this should be on, not off. Default "on" matches the PHP 5 behavior better than "off". Nikita

Bob Weinand

10 years ago
> Am 28.06.2016 um 18:41 schrieb Nikita Popov <nikita.ppv@gmail.com>: > > On Tue, Jun 28, 2016 at 6:16 PM, Dmitry Stogov <dmitry@zend.com> wrote: > >> Hi internals, >> >> >> The RFC has been moved into voting stage: >> >> >> https://wiki.php.net/rfc/async_signals >> >> >> Thanks. Dmitry. >> > > What about Bob's suggestion to add a flag (for disabling async signals) to > pcntl_signal() instead of having a global option? > > In any case, imho the default for this should be on, not off. Default "on" > matches the PHP 5 behavior better than "off". > > Nikita
The reason I've chosen to not pursue this: In the next major PHP version we may remove ability of manual signal handling and corresponding pcntl.async_signals INI directive or pcntl_async_signals() function. Thus I don't see much sense in adding complicated logic (extra parameter) if we're anyway going to remove that. After all, current sync handling can be changed to add to an array and then read the triggered signals from that array. Thus synchronous handling can be abolished. The only reason we really needed true sync dispatching before was it not being too reliable and relying on ticks. Bob