Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128982 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id ADDA51A00BC for ; Mon, 27 Oct 2025 16:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761583098; bh=2qHpmcgBUnkeJZNN/qdVEhAnVXI6AK0s8LqGbY3hWP0=; h=Date:From:To:In-Reply-To:References:Subject:From; b=BDiZhKXNC3lu/BKfaMRfelDAGvf2tgInvfcvo+whabN84zdH6nxyzqH+phQkkxfRz R/U+rKTkSEt7nZQSG25dvkev0UFomKNUkukc4njbPRtVHPleM9tm1CCGqr6CmU3h7D avlEz1zsOCERIbO79OrUILzk1nALlLk0LuZXV2eiykm9WD+7BVoKiPAe3TjbF0+ZAt lKpVESzF/NyK6OE0Ql8Vk6JxSFLLWwsLWyMmqPtnmslxXKWAf0eSNbAnm1ke93Qjwq lEungLFYUf7j7Har9QeciYpUW9+4ulSoZGkwuVOQ4bZJWtW0iINfRoOUnle2YkbSLl ykMXy7MpCVx3w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A921D18033A for ; Mon, 27 Oct 2025 16:38:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 27 Oct 2025 16:38:17 +0000 (UTC) Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 0D7E3EC0093 for ; Mon, 27 Oct 2025 12:38:12 -0400 (EDT) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-09.internal (MEProxy); Mon, 27 Oct 2025 12:38:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1761583092; x=1761669492; bh=c9ODIY14D9y7nrzyTURgy aCU8otXvGt3M4ZlZue0BQI=; b=NMI+3nDE269QcF4iT6FXqe31NuP/ALm8rHJtZ 0K93LMzEFlY2t4CbweC4h41sFBbH3aqX4ZU5Lro73YDiGvn0kOOXKt7k5K2wOhEQ A3ay0J8uQnZ9/9U9sgxrWxfIhHdYdYBdT1fvXSknHzOW0ka7I791ZtvCSNvuiLxE DG2iJ2NzEj5YTlHrMdou4oDzYCHcsukLB/XHomrSNfbVm7zgoSkWP9ZE2H5FEzfS Xa+4HYbhSCMQ77E+FeS2RvMdKcGa7lvK1aVIczjaTR6Q9f3kWIi9N+zpniyDQXxX Jvm8VMSxEv5e406xAsdrXKsc0ukfL6+0JZ+Dhld+p5KZUx3Lg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1761583092; x=1761669492; bh=c 9ODIY14D9y7nrzyTURgyaCU8otXvGt3M4ZlZue0BQI=; b=sM5lwfDefGDskBFin xdYXC9xzJQYRGbXXTPyfRSmMbe+dQLSkIJdQtSENxl3INicYUmxiYp5FOrLmzjHJ Um1TOElPx0KiMQ8bd7tRcJdJ8loJTaLESGCh5/G3Jmj61laFBaoQh0j4aGRgNk9y k4Zw/O6UAZpWZegFKlBcA8Hb2V+ro+1deVLXYP2/9O8yxjN0ZAsNW/gEnMfdhtv7 15MYKIq2ghk2+G+35KajwQKF06XgeI1DiQVJLP5YZU/NpIUarNU5oOJs/y5tMHze 2odKzy+xHOvT7jl1KS59NXsdK4ejmNqC7yref8meCF7Kw7ZEkebctys7RSpGDhcg +iGUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduheekgeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeffieeivdfhvdeguddttdegteeiueegvefhteehfeeffeet udeitdehtdegjeeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghp thhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsh eslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9E9E118C004E; Mon, 27 Oct 2025 12:38:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: A_2680hpYOEN Date: Mon, 27 Oct 2025 11:37:50 -0500 To: "php internals" Message-ID: In-Reply-To: References: <889d3042-7b3e-4152-bd8c-09bbcc967309@app.fastmail.com> Subject: Re: [PHP-DEV] Re: PHP True Async RFC Stage 4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Oct 27, 2025, at 11:18 AM, Alexandru P=C4=83tr=C4=83nescu wrote: >>=20 >>=20 >> On Mon, Oct 27, 2025 at 6:05=E2=80=AFPM Larry Garfield wrote: >>> I am not sure how feasible this is, but would there be a way to spli= t the "async toggle" of IO operations off to its own PR/RFC? To me, tha= t is by far the most important part of this RFC as that's the biggest bl= ocker for wider async adoption, but I'm not sure how many layers are nee= ded above it to make it possible to toggle in a safe fashion. >>=20 >> Hi! >>=20 >> Can you clarify what you mean by "async toggle"? >> Is it the actual implementation that would use async constructs if th= e current context is a coroutine for each implementation of IO functions? >> Yes, for that, it would be nice to have separate PRs, even multiple o= nes for easier review. But maybe you mean something else... >> =20 >> --=20 >> Alex The most important feature of this RFC, IMO, is that when async is "acti= ve", all IO operations become non-blocking and automatically suspend an = active coroutine, so that other coroutines can act. That means you can = write file_get_contents() or whatever, and in non-async land it will blo= ck as normal, but in async land it will suspend and let other coroutines= run, then pick up again when ready, without requiring any code changes. (At least that's how I understand that part of the RFC.) That is *huge*, and easily the most important feature. Really, if we ha= d that in core it would be possible to do most of the rest in user-space= with the existing Fibers, I suspect. But I don't know how feasible it = is to separate that part out, in large part because it would mean exposi= ng some kind of way to toggle if async is "active" (for some definition = of active). But if that is possible/feasible, that would be a much narr= ower, more easily reviewable, and still highly useful RFC that could be = iterated on in both user space and core. I do not know how coupled that is to the new Fiber-incompatible loop, wh= ich is the biggest problem. --Larry Garfield