Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128896 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 71B961A00BC for ; Wed, 22 Oct 2025 08:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761122618; bh=UZ918dw92uecRxsZso5wTe+DnqAm9OqwWe8v4R3c/I4=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=g06JqqaLAADnGBfV5jeZS8EpVYIPqqooyRh3DEfW7ArZK80Rii2DwJ2xpz69DFM02 /fmY3K0VyTDamN4UU7ZMV92lVzQ0T+JyZBbnWRQCFn8Zu+SjS5zKvkDKPEvGnaFfRI UzpvwgzO7vdSFnE5Fux7JUyN7mwM6vGjzvz1KilGpNSUcQPJ97kHEpgEnNZD6grEwV OPqzusJbLHDY8t0vDOfxACuGjtBmiUwuaYMijgT94unzVh766lDC1UX9Dnlp2xzPgX gSvQmRICHiMcww7sfSmY/4CHSqMbdg3jsUvMfbOzJKUxIqDb47q4A9AZnEoH7phKZ+ PWjteTd2waoAg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0CF6B180086 for ; Wed, 22 Oct 2025 08:43:37 +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=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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:43:36 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 24D401D00116; Wed, 22 Oct 2025 04:43:31 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Wed, 22 Oct 2025 04:43:31 -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=1761122611; x= 1761209011; bh=UZ918dw92uecRxsZso5wTe+DnqAm9OqwWe8v4R3c/I4=; b=u RjGRPbET3uQuOhw25xSABU0EzVs4GR55otRPUFYczap1wMGTuSilpfXSVcDqVJfR 2TvJgpcC5TwoDyEPpyA9pVdAJCL3kkPLAA2bdRiY/c0FsmRq2gP+4E0mthcHJswJ jBhf2g+maiufHdoA2hHN1B98b0s53UWfUIh1bgsZMja26ne+mlmxVI3R7/rpeV4J g1kbjkVszkN16k4F+1XtzeNrjGR/rnPxcY+MegkcAuZqhGNkCKrOZDUuh8wfEtNV dGvhLEJZdavQGJoCmv6KuHg4ZeeO9VMjF5o2IWUPPO1gZe3R9Y4y3N6HIjU0lHN0 EdiSk9akUjHI9x1Vx1MzQ== 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= 1761122611; x=1761209011; bh=UZ918dw92uecRxsZso5wTe+DnqAm9OqwWe8 v4R3c/I4=; b=H+YNRmIjhsB4W8/f0fpQLE3r+Ssn0zDbVXxIwPvHXFYDLbIXZkg MmVBa01o8ILIxIo8trYHdaDjU4ihCb4K5uhXhXvbEFscLGFnGoYt9AewBablT15Q +KF1BOs6ZAlcsiG8RQUX9yuBcDEeF/Qu6dEu36k66PXEnHYJUHE01i7bBwr7ac6U Dx6Edhz4sBH4lDviGROpsDlz1/TSY82bS3jFsYPDQ6mmHidvvz/00rkpIJQ0PvkX jHiUkUyd+nzpJ19UT0AQNThlsA+26B6gdD9LSzTAUM8P8Z+v9EeVW3JVreb29VGu b2WSSP3Fhz5ZfZAY/CgdlLFPToFycxf6CPg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddugeefudefucetufdoteggodetrf 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 82A8F1820054; Wed, 22 Oct 2025 04:43:30 -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:43:08 +0200 To: "Edmond Dantes" Cc: "Aaron Piotrowski" , "PHP Internals" Message-ID: <151800a7-1094-49bc-8e43-c593a74741af@app.fastmail.com> In-Reply-To: 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> Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 Content-Type: multipart/alternative; boundary=386a0fe1174543359252fdd0d705d47c From: rob@bottled.codes ("Rob Landers") --386a0fe1174543359252fdd0d705d47c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Oct 22, 2025, at 10:34, Edmond Dantes wrote: > > A simpler solution might be to keep things as they are, but have the= non-idempotent constructs be generators of Awaitable instead of non-ide= mpotent 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 abandon= ing the general behavior > unless a convincing argument is found showing that it leads to real > problems. >=20 > -- Ed >=20 The example I gave is probably a good one? If I'm writing framework-y co= de, how do I decide to await once, or in a loop? In other words, how do = I detect whether an Awaitable is idempotent or will give a different res= ult every time? If I'm wrong, I could end up in an infinite loop, or mis= sing results. Further, how do I know whether the last value from an Awai= table is the last value? I think if you could illustrate that in the RFC= or change the semantics, that'd be fine. =E2=80=94 Rob --386a0fe1174543359252fdd0d705d47c Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Wed, Oct = 22, 2025, at 10:34, Edmond Dantes wrote:
> A simpler solution might be to keep thing= s as they are, but have the non-idempotent constructs be generators of A= waitable instead of non-idempotent Awaitables
So it=E2=80=99s = the same as in C#?

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

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

That=E2=80=99s why I=E2=80=99m not y= et sure it=E2=80=99s worth abandoning the general behavior
unl= ess 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= ? In other words, how do I detect whether an Awaitable is idempotent or = will 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 th= e last value from an Awaitable is the last value? I think if you could i= llustrate that in the RFC or change the semantics, that'd be fine.

=E2=80=94 Rob
--386a0fe1174543359252fdd0d705d47c--