Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128897 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 3ABA51A00BC for ; Wed, 22 Oct 2025 08:54:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761123253; bh=2Lm05OsPOpKWt5W9Ql2xZDBkms0E0Ge6zxoAyCMqyaQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=WJHY9lliKw1CsdAhsG/Hm02Rn3WHdkL+HRFjKe+4Egc085svRnk+SQy/I9n3ER0a3 Em/W+dtDADED+IIgnSFSiULOpyPEsH/BIAfK5uIz+izw4cPjdB+TmfmDbTYiGEl7C9 BjxokI3jVjtcwoe6y/zuNVGoDq5uAIw8c2gPELCQpume7384TO3S37m+JQBDdDdm/K br1Lk6LzmHeIHEPgVpkBdN9ogwmPx6Ux4nMjkMUWoMdgUKM4wuttKqxd6cABuIRbr5 fBYuoJJ8sSDOhvRL9lBH8s/T/LU4FZzOtDbZgshctrPEqp8wTLuvE52SszccK+TBEF C/PkyC3f+6xuA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2608E180084 for ; Wed, 22 Oct 2025 08:54:13 +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-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, 22 Oct 2025 08:54:12 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 6DB067A0146; Wed, 22 Oct 2025 04:54:07 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Wed, 22 Oct 2025 04:54:07 -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=1761123247; x= 1761209647; bh=2Lm05OsPOpKWt5W9Ql2xZDBkms0E0Ge6zxoAyCMqyaQ=; b=A O0OWpKkgiG/Myx02ZCgOb3SnTXmKeHt4yrZ0aXOMg7V32itd1pj9T45U8STrAnMP dkuLJgws6KNI3S8vnDb0hQqyXb1tHmySgjc7yBNZ8gWxtsZ54EVQ85vSEXxBjWLN HLH5f/GLM3iuwfvYPIFQ7ZWE9dXvwJLLXiKDnq44y0/uA4hRr/CBDGFjQn4kII3V dIRbja5nnGsQJzxAVSB+ww/CvXAmr7GLzZShLYq2La52OfK3fq8cv77TsieS7qwa EemOC4LO29hkFChpGmBUQU+itCtldDVODrrv+3BO9cYFQiHEwbNxZ56BYI4RU2gc 26bZBqvaMa5DEpu7AvFIw== 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= 1761123247; x=1761209647; bh=2Lm05OsPOpKWt5W9Ql2xZDBkms0E0Ge6zxo AyCMqyaQ=; b=QlwYADxfs5x8+Os6Q3EFqfBVclO58223mjpOuAL6MhlPshRSrHE tMIqPkkmCN96VHEwdEnirWiTdG3Hfb1aR/EGW/RQs2iVImjlNHpIE3t8jxXeNSbi h5sLW+ak1N08cn8ng5OAI9npXFz4hHF1I7jzqYnY/jsC0xjWNvujPSB+eLdBJXM6 VvCpxh+97O4k2It6uLBFi51ebdcKTt5S7goajl9gZGuAA6UqmGKjl+fmAMNAVtQD FehmfnfvTZC1w2N9xZjgnBlpya0UCLWZdjxz3MHE91zNfwPcGwhdpdwBNqL2T+Ih d7tJMru4RDEatNyPi0JQNiFiuG7BkRx4Omw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddugeefudehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfn rghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtth gvrhhnpeeiueethedvvdefjefhgfeiheelheehtdfhfeekjefflefgvedvkeduteejjedt tdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehroh gssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopeefpdhmohguvgepshhm thhpohhuthdprhgtphhtthhopegvughmohhnugdrhhhtsehgmhgrihhlrdgtohhmpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvthdprhgtphhtthho pegrrghrohhnsehtrhhofihskhhirdgtohhm X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D7E301820054; Wed, 22 Oct 2025 04:54:06 -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: Wed, 22 Oct 2025 10:53:46 +0200 To: "Edmond Dantes" Cc: "Aaron Piotrowski" , "PHP Internals" Message-ID: <927f1068-ec9f-4548-984f-fceb7b3e682f@app.fastmail.com> In-Reply-To: <151800a7-1094-49bc-8e43-c593a74741af@app.fastmail.com> References: <0e4e39d6-9cc9-4970-92e0-2463143b4011@app.fastmail.com> <37180d8d-85b4-49a3-a672-334bf4329470@app.fastmail.com> <2f8524a7-dea2-4fbf-933a-c538d3706253@app.fastmail.com> <151800a7-1094-49bc-8e43-c593a74741af@app.fastmail.com> Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 Content-Type: multipart/alternative; boundary=2d250640a21e46d489389ff6a7b72e91 From: rob@bottled.codes ("Rob Landers") --2d250640a21e46d489389ff6a7b72e91 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Oct 22, 2025, at 10:43, Rob Landers wrote: > On Wed, Oct 22, 2025, at 10:34, Edmond Dantes wrote: >> > A simpler solution might be to keep things as they are, but have th= e non-idempotent constructs be generators of Awaitable instead of non-id= empotent Awaitables >> So it=E2=80=99s the same as in C#? >>=20 >> The problem with this situation is that so far I haven=E2=80=99t been= able to >> find any cases proving that a non-Future object could cause serious >> failures in the code. >>=20 >> At the same time, if a select case expression is introduced in the >> future, it would make more sense for select to work with an awaitable >> object rather than a Future. >>=20 >> That=E2=80=99s why I=E2=80=99m not yet sure it=E2=80=99s worth abando= ning the general behavior >> unless a convincing argument is found showing that it leads to real >> problems. >>=20 >> -- Ed >>=20 >=20 > The example I gave is probably a good one? If I'm writing framework-y = code, how do I decide to await once, or in a loop? In other words, how d= o I detect whether an Awaitable is idempotent or will give a different r= esult every time? If I'm wrong, I could end up in an infinite loop, or m= issing results. Further, how do I know whether the last value from an Aw= aitable is the last value? I think if you could illustrate that in the R= FC or change the semantics, that'd be fine. >=20 > =E2=80=94 Rob Accidentally sent too early: but also, what if there are multiple awaite= rs for a non-idempotent Awaiter? How do we handle that? =E2=80=94 Rob --2d250640a21e46d489389ff6a7b72e91 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Wed, Oct 22, 2025, at 10:43, Rob Landers wrote:
On Wed, Oct 22, 20= 25, at 10:34, Edmond Dantes wrote:
> A simpler solution might be to keep things a= s they are, but have the non-idempotent constructs be generators of Awai= table instead of non-idempotent Awaitables
So it=E2=80=99s the= same as in C#?

The problem with this situation= is that so far I haven=E2=80=99t been able to
find any cases = proving that a non-Future object could cause serious
failures = in the code.

At the same time, if a select case= expression is introduced in the
future, it would make more se= nse for select to work with an awaitable
object rather than a = Future.

That=E2=80=99s why I=E2=80=99m not yet = sure it=E2=80=99s worth abandoning the general behavior
unless= a convincing argument is found showing that it leads to real
= problems.

-- Ed


The example I gave is probably a good one? If I'm = writing framework-y code, how do I decide to await once, or in a loop? I= n other words, how do I detect whether an Awaitable is idempotent or wil= l give a different result every time? If I'm wrong, I could end up in an= infinite loop, or missing results. Further, how do I know whether the l= ast value from an Awaitable is the last value? I think if you could illu= strate that in the RFC or change the semantics, that'd be fine.

=E2=80=94 Rob
=

Accidentally sent too early: but also, what if there= are multiple awaiters for a non-idempotent Awaiter? How do we handle th= at?

=E2=80=94 Rob
--2d250640a21e46d489389ff6a7b72e91--