Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94261 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95494 invoked from network); 26 Jun 2016 14:14:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2016 14:14:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.110 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.110 blu004-omc2s35.hotmail.com Received: from [65.55.111.110] ([65.55.111.110:50888] helo=BLU004-OMC2S35.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/20-27012-A33EF675 for ; Sun, 26 Jun 2016 10:14:21 -0400 Received: from BLU436-SMTP211 ([65.55.111.72]) by BLU004-OMC2S35.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 26 Jun 2016 07:14:15 -0700 X-TMN: [j/U63iE/nP0NUkqpFOV2OcqjFsDNODV9] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Sun, 26 Jun 2016 16:14:11 +0200 CC: PHP internals Content-Transfer-Encoding: quoted-printable References: To: Dmitry Stogov X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 26 Jun 2016 14:14:13.0064 (UTC) FILETIME=[03D2EC80:01D1CFB5] Subject: Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead). From: bobwei9@hotmail.com (Bob Weinand) > Am 24.06.2016 um 12:20 schrieb Dmitry Stogov : >=20 > Hi internals, >=20 >=20 > Please review the RFC https://wiki.php.net/rfc/async_signals >=20 >=20 > Thanks. Dmitry. Overall, I really like the approach. I've thought a bit about the function vs. ini approach. Advantage INI: - Global setting, set it once, works everywhere Advantage function: - You are guaranteed one specific initial value and don't see surprises = when one environment doesn't match your default and you forgot to = explicitly enable/disable it. The former one is good when you have your own scripts everywhere on the = server, the latter is preferable when you are installing external = applications. An alternative approach would be adding a flag to pcntl_signal() whether = it should be dispatched asynchronously or held back for synchronous = dispatching (with async being the default). I prefer that third option because of the following scenario: a phpunit test with timeout testing an event loop. Event loops naturally = want to enable synchronous dispatching, which obviously will hold back = the signal and thus the alarm set up by phpunit will never be triggered = if the test ends up in e.g. an infinite loop. I'm not convinced by this solution, but it's the best one I can think of = solving all the cases. Bob=