Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94274 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56282 invoked from network); 27 Jun 2016 11:40:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jun 2016 11:40:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.213.45 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.213.45 mail-vk0-f45.google.com Received: from [209.85.213.45] ([209.85.213.45:35225] helo=mail-vk0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/52-40393-8B011775 for ; Mon, 27 Jun 2016 07:40:40 -0400 Received: by mail-vk0-f45.google.com with SMTP id j2so228004131vkg.2 for ; Mon, 27 Jun 2016 04:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YNBw0n8Dt7nGnTyEqFqTj4whsDjc9GKJAzSWoNrILk4=; b=qoCR2qZAjTSGN6VT7lJTVr7If3CYOwhQmOxgsBZvHJ0bm2+uKK7lwxgwfWl0ZIDEYi n5ocE1nRr52U7XmCdFa5s+QwjA/LclOcM/cWd6+l2cktkEkOrbsc3wrFVfpi1AYCj/YN JaCoNu+7ZOCwubjQE+67P732G8nxHtndfbr1hgw+jAXklREn9nBN8HZ7Kl9WPJ2xTkXs W33+mQaWZOdcyi3lSKQ+yjfzXn3Pi910L5NOlnKmUbNjbl57m6kyZdRxXtJzG60tcEyz TnO5WEarI+sYSzjCDAEmaOpGkzETG9sczLHpRAut6Asr5DrAOYmUkKxipeUjwUwJntEu WXBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YNBw0n8Dt7nGnTyEqFqTj4whsDjc9GKJAzSWoNrILk4=; b=Xr+zzlOcyLxEWfbhHMnRRIU0RfCMUc+XUugd3P+8Hi0wZmg/9jB+C4YRxQgDz/Telk 102Y6sBinStYLdyRPAS2/d2v6vfmqeEA2TnoDa9UoY7WTtxoGHIt4kdCcWZXkuN94SGs q9EoOGlpofKtysqq3h7xJHFaWGRn2LctnaQZ9O3rQnlSn92mvb6SHyw2zCMbGvlS813P +P5kp8lAN/qbGcTyIrzi+uuRz82ECDo61njMXTU29bodlmr4SchijUVAeHuX2PPEUrqA 4uAuLfvDqVVgGEK+K6K+5eCxpl0mLjLgb3WiHZv+Ddy8Te32/Tuu2vQUMPQvqozy2jGS G8yw== X-Gm-Message-State: ALyK8tJf4WnuKWWRrU31BHhcTXDCkeTbSUzE5w9aYLJrtyZTSiaTcklEkbuxvkOH0pFvY7s/KtLYSVYfRCrNAA== X-Received: by 10.159.36.245 with SMTP id 108mr8072738uar.121.1467027637714; Mon, 27 Jun 2016 04:40:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.50.150 with HTTP; Mon, 27 Jun 2016 04:40:37 -0700 (PDT) X-Originating-IP: [109.157.60.99] In-Reply-To: <0902b9fe-01c4-a4c8-aa86-291c9be603cc@zend.com> References: <0902b9fe-01c4-a4c8-aa86-291c9be603cc@zend.com> Date: Mon, 27 Jun 2016 12:40:37 +0100 Message-ID: To: Dmitry Stogov Cc: Pierre Joye , Bob Weinand , PHP internals Content-Type: multipart/alternative; boundary=001a11398fe638dc3b053640fda9 Subject: Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead). From: pthreads@pthreads.org (Joe Watkins) --001a11398fe638dc3b053640fda9 Content-Type: text/plain; charset=UTF-8 Pierre, > It affects how signals are handled within the engine, obvioulsy. How signals are handled in the engine was already changed, the only thing being proposed here is that ext/pcntl uses that new feature. Cheers Joe On Mon, Jun 27, 2016 at 12:28 PM, Dmitry Stogov wrote: > > > On 06/27/2016 02:05 PM, Pierre Joye wrote: > >> On Mon, Jun 27, 2016 at 5:08 PM, Joe Watkins >> 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: >> >> > 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 > > --001a11398fe638dc3b053640fda9--