Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107944 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52190 invoked from network); 23 Dec 2019 17:34:47 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 23 Dec 2019 17:34:47 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 9BB6F2C04EE for ; Mon, 23 Dec 2019 07:36:12 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS63949 45.33.0.0/19 X-Spam-Virus: No Received: from s2.servercanyon.com (s2.servercanyon.com [45.33.0.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Mon, 23 Dec 2019 07:36:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=judahwright.me; s=default; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Cc:To:Subject:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cKeY6gMXoWofnQ7K82DrSLmDBJM0oZs1xZ5LOaJi2jY=; b=FC4X7sEIMRa49ODGrW3vwaleH 95RKO31cUZRtsGYzx7JmRPayPw/NnhRh2WqFPJfuyF2/FW2HN+YtWwzOL1r2iNwJSVOId4bAuQwTj PUzNz8pmpSK0pbt7C6br4CqEjvd5i1cSvcXwZwKD5RAMzcYAq8biSqleN6DXpXdru9JPMtn2ChuOz HUrzHxzgvbmRiL1VpRrVohSJEC6ebvNoeP+3kcEAkIaJ/elg+jM+/RUX1JGTafhRVPDiL9s+OhPfd PlpyAiZQDPF/Pc46jydAX+qW92s3EFm09hWO1g3Xt8mQYda/mr6OUjw2JWFuusm87eyEHS+bjuU0V gZHdEni8A==; Received: from 24-116-109-194.cpe.sparklight.net ([24.116.109.194]:34246 helo=[192.168.1.89]) by s2.servercanyon.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ijPkh-0001ny-GL; Mon, 23 Dec 2019 09:36:11 -0600 Date: Mon, 23 Dec 2019 08:36:09 -0700 To: Aran Reeks Cc: internals@lists.php.net Message-ID: <1577115369.5410.0@judahwright.me> In-Reply-To: References: X-Mailer: geary/3.34.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-ZAFsvKujWLF9k/IETJrs" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s2.servercanyon.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - judahwright.me X-Get-Message-Sender-Via: s2.servercanyon.com: authenticated_id: hello@judahwright.me X-Authenticated-Sender: s2.servercanyon.com: hello@judahwright.me X-Source: X-Source-Args: X-Source-Dir: X-Envelope-From: Subject: Re: [PHP-DEV] Support for Async / Await From: hello@judahwright.me (Judah Wright) --=-ZAFsvKujWLF9k/IETJrs Content-Type: text/plain; charset=us-ascii; format=flowed I really like this idea, non-blocking IO via asynchronous operations in PHP would be amazing. I am running into an issue right now where I want to listen to several different socket streams for data. One example of this would be: Open socket AWait for dataClose socket AOpen socket BWait for dataClose socket B This would be so much easier if I could just listen on both in a non-IO blocking fashion. I would find this immensely useful. ~Judah On Sun, Dec 22, 2019 at 8:59 pm, Aran Reeks wrote: > Hi Internals, > > Since the start of PHP 7, we've seen some amazing performance > improvement > version by version as a result of core updates. > > Now some of the biggest wins have been implemented (with JIT due for > PHP > 8), I'd personally love to see support for Async / Await introduced in > PHP's as a core language feature too. > > Being able to perform tasks in parallel such as reading or writing to > DB, > cache, queues... Would be a massive advantage and the performance > gains > from it could be really exciting! > > Looking at how Hack has implemented support, this seems like it could > be a > great start for a RFC, what does everyone else think? > > Here's a link to Hack's implementation for reference: > > > Thoughts welcome from everyone. > > Cheers, > Aran --=-ZAFsvKujWLF9k/IETJrs--