Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60347 invoked from network); 9 Feb 2018 20:53:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2018 20:53:10 -0000 Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain telia.com designates 81.236.60.154 as permitted sender) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:39027] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/F6-21403-33A0E7A5 for ; Fri, 09 Feb 2018 15:53:08 -0500 Received: from [192.168.7.8] ([213.64.245.126]) by cmsmtp with ESMTPA id kFfLeUU0NVsIhkFfLeNLZK; Fri, 09 Feb 2018 21:53:04 +0100 To: Niklas Keller , Haitao Lv Cc: Aaron Piotrowski , PHP Internals , Dmitry Stogov , Sara Golemon References: <76EBF900-3BE8-4B60-9422-880A9754FCC4@lvht.net> <0DDFDACA-6322-461C-9D57-215E8C7D9CD0@trowski.com> Message-ID: <20820721-1f64-b3e2-db89-a3957bcbe841@telia.com> Date: Fri, 9 Feb 2018 21:53:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv X-CMAE-Envelope: MS4wfIBVYz3oUuG47p0sGJj3wtnjVeHZkZtoYtL4fRan70PApmS9QUZd13YpewZbhA4Ak8Fdudla2b3PSVjn8V7ChmYi4m59yN3LvpuHRrkGycgqxzlKG74S ob4KKfEikSWa8pQSeAgC87xsnRSIjeA5h+M+Cy6/Mqdfhsdzesq/r6AHvRSnaB5A7fCv5GRD0/BUjBdykSEj/Lph0BMYh9tshysrYXrhc7n8uGpHyiORJkvJ N0p0DBjHgENqYDZX2/5ayjqvPpHfc47r5AbMt2f05qj/AcsEpZie8unZMiPOG6xihkp8yTn+Gw14HJeDdeXEEg== Subject: Re: [PHP-DEV] [RFC] Fiber support (again) From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2018-02-09 kl. 12:48, skrev Niklas Keller: > > We have started building a PoC library on top of Fibers, see > https://github.com/amphp/green-thread/blob/7bd3470e7986169372d5e9c39500f3652091b512/src/functions.php > . > > We'd like to avoid the additional `await()` function and rather directly > couple Fibers with promises in the PHP core. > > Using `await` (the keyword) instead of `Fiber::yield()` feels way better > and avoids the need for any wrapping libraries for what should be a core > feature. > > `async` can be added to create a new Fiber and Fiber can implement Promise. > Regarding these potential new keywords await & async. Any need to look into how Hacklang uses these keywords? Could there be portability aspects on the functionality in itself? Regards //Björn Larsson