Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128848 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 63C461A00BC for ; Thu, 16 Oct 2025 07:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1760599130; bh=xWl4+XzQYAcvW8MgYmB9qDhPxAhIIUFNPg4yq8FR7zQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=QCauRKLHupzaWplM/ogBDRgq0CJe3wAhy1JOGs+vi0yfN4jI8C1EFqPK/grnqaL5Z txaLXrIuRKpLJiyLpEbIMqzbfJtT5KYaohldWEdCR/zC92g1f/Q616MKNagUSVFA0/ 63DzS/V8VfL7lqcWyN8nJhsi22xIqiXqn7stPwYJJ4KwKV9lZPstD8J7/5GcE4odOi utBLchTQ9MwsaNW5dmGNIpXeMOAA+26SDA/menpQR6f7Ob/a/WSnBvfozOp3U2KeNj 7bJ/Gsl+ZWb/PXUZLDGJ7Z99LyTRmyUpSSBry8Xb3Oq43DfyS81GLlETCM6YPFguID JOFSPckq4++IA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 36EFA18003F for ; Thu, 16 Oct 2025 07:18:50 +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=-0.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 16 Oct 2025 07:18:49 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 692567A0161; Thu, 16 Oct 2025 03:18:44 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Thu, 16 Oct 2025 03:18:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=1760599124; x= 1760685524; bh=xWl4+XzQYAcvW8MgYmB9qDhPxAhIIUFNPg4yq8FR7zQ=; b=o TGM200B/iD+yLcOF0/BPnsY5E7uJYwHwnptDj6I+AJ+yrLxEM66jJJcDFVfoiq4s 3Kb/8gvH7pYX171FbiHhwNnc7kk4eOo7rKpWPN/RAPnLk3ITD2r6aEOWS3rBL7I0 Etm3jliP52li6FeOdtjbIyDZx7QNQskDvlzQZavojoUxWfjdgbs5qMXYao37VBvW ke8uNhkGmd3wk2e+D8by1eIcXAZuyWWqgmwh3UcJRPnz2zc8+lJgkEVlvnrvcypZ fHrMTgwAeW4arQv//6xlJHg4dDglBXotbpqa6OqJNSRieJL/EoQNhdTfsPHoVngb zXhMEdVrVfv+KzVTrSjbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm2; t= 1760599124; x=1760685524; bh=xWl4+XzQYAcvW8MgYmB9qDhPxAhIIUFNPg4 yq8FR7zQ=; b=JbDj/QjR+RxtYNbkloRGC/vi0gXxSBUkr0xDGKB+GW7VA/P/8iN L2AhIkD+r/myqakjkeGGGu3NS53YUvv5YQFxWe401oR4ZUvcwEYcI5tfTBsvG4gb 5KSZpDL6kL45pr/NpVudScw9C5t8GUC6b2IoREpbRmn43M5mJ7f2N1dEzXYuYstM o9EjCMTdr3xIkvvemmTdzFQ5t2TorOX6MQH3/qbzBqkCg8O2T94FU/89jOk+jPIn ebXgs6+ZdoTM9q/0IzicVJIDx0Ik6geS2LLT1n03zl7G4kGtGAm6vvkPYliSKwxd c9KX1kj2ztQUqWaRdzEIGN7LIqCdomPlhFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdehieejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefoggffhffvvefkjghfufgtsegrtderre ertdejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghothhtlhgv ugdrtghouggvsheqnecuggftrfgrthhtvghrnhepieeuteehvddvfeejhffgieehleehhe dthfefkeejffelgfevvdekudetjeejtddtnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvshdpnhgspg hrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepvggumhhonhgu rdhhthesghhmrghilhdrtghomhdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsth hsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id EDB641820054; Thu, 16 Oct 2025 03:18:43 -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: AG5VjklPAjNR Date: Thu, 16 Oct 2025 09:18:23 +0200 To: "Edmond Dantes" Cc: internals@lists.php.net Message-ID: In-Reply-To: References: <2b9fd3ec-50ca-41e4-985a-274f886df8b3@app.fastmail.com> <2e39e211-c816-41db-a079-f2c6b3934e0a@app.fastmail.com> Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 Content-Type: multipart/alternative; boundary=f2c82169b5de4e089215d289e96dba12 From: rob@bottled.codes ("Rob Landers") --f2c82169b5de4e089215d289e96dba12 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Oct 16, 2025, at 09:08, Edmond Dantes wrote: > > I would expect more than "because I said so" >=20 > In my response I provided arguments, but they were ignored. If you > tell me exactly what is unclear to you, I can give a concrete, > well-reasoned answer. >=20 This is all I have to go off of, and my explicit rebuttals as to why the= y are not reasons: > Therefore, if a `Scope` needs to be awaited, it can only be done > together with a cancellation token. This is effectively not true. I can pass a cancellation token that never= cancels. Sometimes, this is exactly the behaviour that is desired. > In real-world scenarios, awaiting a `Scope` during normal execution > makes no sense, because you have a `cancellation policy`. > This means that at any necessary moment you can dispose() the `Scope` > and thus interrupt the execution of tasks inside the black box. That sounds like a feature, not a reason. > For the `TaskGroup` pattern, which exists in the third version of the > RFC, awaiting is a relatively safe operation, because in this case we > assume that the code is written by someone who has direct access to > the agreements and bears full responsibility for any errors. We aren't talking about TaskGroups, but regardless, I fail to understand= how that makes scopes 'dangerous' to await and why it should not be Awa= itable. > So, `Scope` is intended for components where responsibility is shared > between different programmers, while `TaskGroup` should be used when > working with a clearly defined set of coroutines. My question is "why does this mean something with an await method isn't = Awaitable?" -- it seems that this is orthogonal to the interface and the= reason why it should/should not be Awaitable. =E2=80=94 Rob --f2c82169b5de4e089215d289e96dba12 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Thu, Oct = 16, 2025, at 09:08, Edmond Dantes wrote:
> I would expect more than "because I said = so"

In my response I provided arguments, but th= ey were ignored. If you
tell me exactly what is unclear to you= , I can give a concrete,
well-reasoned answer.

<= /div>

This is all I have to go off of, a= nd my explicit rebuttals as to why they are not reasons:

<= /div>
Therefore, if a `Scope` needs to be = awaited, it can only be done
together with a cancellation toke= n.

This is effectively not true. I= can pass a cancellation token that never cancels. Sometimes, this is ex= actly the behaviour that is desired.

In real-world scenarios, awaiting a `Scope` during norma= l execution
makes no sense, because you have a `cancellation p= olicy`.
This means that at any necessary moment you can dispos= e() the `Scope`
and thus interrupt the execution of tasks insi= de the black box.

That sounds like= a feature, not a reason.

=
For the `TaskGroup` pattern, which exists in the third version of t= he
RFC, awaiting is a relatively safe operation, because in th= is case we
assume that the code is written by someone who has = direct access to
the agreements and bears full responsibility = for any errors.

We aren't talking = about TaskGroups, but regardless, I fail to understand how that makes sc= opes 'dangerous' to await and why it should not be Awaitable.
=
So, `Scope` is intended for com= ponents where responsibility is shared
between different progr= ammers, while `TaskGroup` should be used when
working with a c= learly defined set of coroutines.

= My question is "why does this mean something with an await method isn't = Awaitable?" -- it seems that this is orthogonal to the interface and the= reason why it should/should not be Awaitable.

=E2=80=94 Rob
--f2c82169b5de4e089215d289e96dba12--