Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112538 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98052 invoked from network); 17 Dec 2020 16:59:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Dec 2020 16:59:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8EBD61804C6 for ; Thu, 17 Dec 2020 08:30:31 -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.8 required=5.0 tests=BAYES_50,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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 17 Dec 2020 08:30:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id 75FE020BA7B9DE for ; Thu, 17 Dec 2020 11:30:30 -0500 (EST) X-Virus-Scanned: amavisd-new at negativeion.net 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 i3YK6yD-RzUI for ; Thu, 17 Dec 2020 11:30:30 -0500 (EST) Received: from [10.0.1.101] (unknown [173.225.146.47]) by mercury.negativeion.net (Postfix) with ESMTPSA id EEB5C20BA7B9CE for ; Thu, 17 Dec 2020 11:30:29 -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.1\)) Message-ID: Date: Thu, 17 Dec 2020 10:30:29 -0600 To: php internals X-Mailer: Apple Mail (2.3608.120.23.2.1) Subject: [RFC] Fibers From: aaron@trowski.com (Aaron Piotrowski) Hello everyone! I would like to introduce an RFC for adding full-stack fibers to PHP: = https://wiki.php.net/rfc/fibers Fibers are primarily used to implement green-threads or coroutines for = asynchronous I/O. Fibers are similar to threads, except fibers exist = within a single thread and require cooperative scheduling of the fibers = by the process. Since fibers do not require a full CPU context switch, = they are lightweight and more performant than multi-processing or = threading for awaiting I/O. An implementation as an extension is at = https://github.com/amphp/ext-fiber Fibers are a complex feature. The RFC contains many examples and links = to code using fibers to help explain and demonstrate what is possible, = however I=E2=80=99m certain many more questions and concerns will arise. = Looking forward to feedback and discussion. Aaron Piotrowski=