Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113477 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97123 invoked from network); 11 Mar 2021 16:12:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Mar 2021 16:12:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 988851804F6 for ; Thu, 11 Mar 2021 08:05:02 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mercury.negativeion.net (mercury.negativeion.net [199.38.81.6]) by php-smtp4.php.net (Postfix) with ESMTP for ; Thu, 11 Mar 2021 08:05:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id 0CB4620CC17237 for ; Thu, 11 Mar 2021 11:05:02 -0500 (EST) Received: from mercury.negativeion.net ([127.0.0.1]) by localhost (mercury.negativeion.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5TXPDvEq6WBH for ; Thu, 11 Mar 2021 11:05:01 -0500 (EST) Received: from [10.0.1.101] (unknown [173.225.146.47]) by mercury.negativeion.net (Postfix) with ESMTPSA id 7847020CC1722A for ; Thu, 11 Mar 2021 11:05:01 -0500 (EST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Thu, 11 Mar 2021 10:05:00 -0600 References: <8812EE70-4720-4639-926E-1EA206624BC1@trowski.com> To: php internals In-Reply-To: <8812EE70-4720-4639-926E-1EA206624BC1@trowski.com> Message-ID: <18FC107D-C446-4F5F-AD12-5B08905E7463@trowski.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] [VOTE] Fibers From: aaron@trowski.com (Aaron Piotrowski) > Hi all! >=20 > A concern was raised off list that due to the complexity of the way = this feature interacts with the engine, it may be best to mark the = feature as experimental. This would allow some changes to be made to = certain edge-case behaviors and, while I don't think it would be = necessary, the public API. >=20 > We (Niklas and I) agree with this and propose that if this feature is = accepted, it is marked as experimental through the 8.x release cycle or = until we're comfortable removing that label, whichever comes first. >=20 > Experimental in this context would mean fibers would be compiled and = available in all releases, but the documentation would denote that = behavioral and API changes may be made in future minor releases =E2=80=93 = use at your own risk. >=20 > As this feature is targeted at library authors and not average PHP = users, we believe there would be little effect to the community to take = this step. >=20 > Cheers, > Aaron Piotrowski > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >=20 Hi everyone! I=E2=80=99m concerned my email above may have had the opposite effect = from which I had hoped. I think the Fiber implementation is sound and the API, mirroring that of = Ruby, is proven and unlikely to require change. There are certain edge case behaviors that I=E2=80=99m concerned may = need to changed, such as the error reporting level that is active when a = fiber is switched. If the @ operator is active, should it remain active = after a fiber switch? Right now, it does not, the @ operator is on a = per-fiber basis, restoring error reporting when switching fibers. = Perhaps though this was the wrong decision. What I was hoping to = accomplish with marking the feature as experimental was to get feedback = on such behaviors and make sure we make the right choices. Recent changes to the JIT also make fibers as an extension incompatible = due to defining a user opcode handler. This is unfortunate, as cli apps = including amphp and ReactPHP greatly benefited from the JIT: = https://www.php.net/releases/8.0/en.php (see Relative JIT contribution = to PHP 8 performance). Integrating fibers in core will allow the opcode = handler to be predefined. Hopefully that provides some clarity to our intensions. Cheers! Aaron Piotrowski