Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126572 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 qa.php.net (Postfix) with ESMTPS id 264B01A00BC for ; Wed, 5 Mar 2025 08:40:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741163843; bh=n03IDBXwze5Oq+jEiAi2l0PMQk3cP7bpbPZ9BmQmOrw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=PkUvYZ5pvyA0YzPertrKMk6FBIYeJ7vCjrvOVP/tVlkyerhMVKr9qBYE+8vBlPyGW sD3N6Am5b73riVt3f4xdEIedwoq2zXrY94kfZ6gsADmIsS1Oa4vft253zmrPfiOLII +HioIdtU0AXVJPDEcQnFaZ2JL8TOCtiB1RUa1PxT/Z64bu8L94tLeUIT6hk3UjHVyf niQQLs0RmxJ9PxnHGWBLLFglF1dlKU7IfgX1zdW6MNnod5q8x+eamvKqA451YGoILp 4APXkasfNu2MxQlzRsfvBgxH4bq/BZtzBuRCgeXz6/NMxvsXeFkvQQ5cLN9kyGO3I6 PTJYJZntX+kIw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 025B7180086 for ; Wed, 5 Mar 2025 08:37:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (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 ; Wed, 5 Mar 2025 08:37:22 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id E16E6254018C for ; Wed, 5 Mar 2025 03:39:57 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 05 Mar 2025 03:39:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=fm1; t=1741163997; x=1741250397; bh=n03IDBXwze5Oq+jEiAi2l0PMQk3cP7bpbPZ9BmQmOrw=; b= txJaohgkeiA9wokaSU457wdHp4ajk2tLmw4yp+BY9ycTFE3B5cjhrpq39pPv2B1U OvA0L/cL2HTBx3bz0osi413/wRZ9wKKM2dRVnwIbFiw2r3UOdBEuliXvjff+crnM optRtV1x9gT4/bzdbsLPHkRR7T74fj0BJdaU/9caO9RcpUpQQvZhqqCPmHdNECbU +faT/Kk05n4XqODUuuelyI1hUOCL382UJsz3A+jfeMYinG8fO9aJwl7FHIGL4fWL kg/X7fixbmRKpc5aybJP56qckm0YjpqoPcqyzEq5XDb1MsDRX9iUJkFEGLYPBoMf KMtbkKjBdF67oIh7sQjdUg== 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=fm1; t=1741163997; x=1741250397; bh=n 03IDBXwze5Oq+jEiAi2l0PMQk3cP7bpbPZ9BmQmOrw=; b=lgAmOI4SbR6IYsUI0 J0f+1eGjLe0l+p8C1RgPXzEAWNsBJt8fSg4xfrAyHA/kEAs1jtonN4Mjb83RrK0u nX6f3/QM7ibNwNTP66KOnPs1XQ6SXWKXE+1ImIEHRJQkf2fD1aRllubDsU8GaNfJ HdczyWJuyb1Etb5+rArEE2JxdQ7bMZlF1/WoYIe67/zK9QpppM6c07VoBZkjeQH2 H3ZJWJRZ3vKo+5/BXekIyoIN4A/VGdJCO97/xpGHpTONmG34wYnJEEFXYtYvItMK jlsdNz1Q0R/EZj+XhIS7DknWrUQAfH5I4UQlrq2ZCyjtIcQM0M36gNlo2YCNjOCR 7smxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdegfeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvffufggjfhfkgggtgfesthhqmhdttder jeenucfhrhhomhepfdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehimh hsohhprdhphhhpsehrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepheelffet iefgveduteefudegtdduveeludegueegleehiefhhefgtdekveevgfelnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhphes rhifvggtrdgtohdruhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuth dprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Mar 2025 03:39:56 -0500 (EST) Date: Wed, 05 Mar 2025 08:39:54 +0000 To: php internals Subject: Re: [PHP-DEV] PHP True Async RFC User-Agent: K-9 Mail for Android In-Reply-To: <9964db8c-0ffe-43d5-8246-47fc76b07180@app.fastmail.com> References: <9964db8c-0ffe-43d5-8246-47fc76b07180@app.fastmail.com> Message-ID: <4030295C-A839-4B01-BC99-E62D6B01BFB2@rwec.co.uk> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 4 March 2025 18:36:37 GMT, Larry Garfield wr= ote: >PHP doesn't have Python-style context managers (though I would like them) So would I, I've actually thought about it a lot=2E=2E=2E But more importantly, this highlights something important about that Pytho= n library: it is built *on top of* a native async/await system which is bak= ed into the language (note the example uses "async with", not normal "with"= )=2E That reinforces my earlier feeling that this RFC is trying to do far too m= uch at once - it's not just about "low-level vs high-level", there's multip= le whole features here:=20 - asynchronous versions of native functions, and presumably a C API for wr= iting those in extensions - facilities for writing coroutines (async/await, but not as keywords) - deferrable "microtasks" - event/signal handling functionality - communication between threads/fibers via Channels - a facility for launching coroutines concurrently (as Python demonstrates= , this can be separate from how the coroutines themselves are written) - maybe more that I've overlooked while trying to digest the RFC Having all of those would be amazing, but every one of them deserves its o= wn discussion, and several can be left to userland or as future scope in an= initial implementation=2E Rowan Tommins [IMSoP]