Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128927 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 C7F5E1A00BC for ; Thu, 23 Oct 2025 08:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761207922; bh=HyBdkLTFUl/wICqXHuFKclztMe/9O6n8+lWTKGuYEW0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=LF2rLdC/e8CbyE4vidNLktwmyKTyaXvd1gY9PFTNELSzdtvzuGDfJg56I+HLFkjKG T+ZdrGJO9r76kngz86LplLRbCO+wxK4ZOio2wXqEnB8mqA7iwW+97V2aTmxnOIQOa7 reSaI+3VS3LaIS8WhPoBgEXJ6x47twK4+W5AyoPRdWUkZrCC97N52g54K6O0lgtcvX E6RRTwD2HhKEVVHfZDZT/e24/KpCpaRvNtjg2fVdWx8PS/Fe2dnXkBjbJcd3C6txMI 7fpggyNGk2TfyquOxlxWsKaK4wxZY1mCsyXvkaBubn+4PfIoAIkqTj5FD5+JbrBe7e oiRTKH6KlLBLw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D38E21804E4 for ; Thu, 23 Oct 2025 08:25:19 +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,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-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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 ; Thu, 23 Oct 2025 08:25:17 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 9285AEC0016; Thu, 23 Oct 2025 04:25:12 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Thu, 23 Oct 2025 04:25:12 -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=1761207912; x= 1761294312; bh=HyBdkLTFUl/wICqXHuFKclztMe/9O6n8+lWTKGuYEW0=; b=I mEXYWjWtYppwDL6kHC5hKkII6HEWCelyxqIsy7cTBb8yqrCdHut1S1BDPmpEjl5v VfWMFfXWljgQWk/5KhkUBZHprpEmw/7Yst/qyOQbBKiKTEvd1rPle1kEl+VGbF13 qhfzW8lRZBSuDqaAhg+wXuwWsicQUXbU03T7Id/TumQ7VNfjEF3iYrs61eUqahyx /Uz91FA3keCxskZ482Tc/QBinKqlbhEaX/B6ZvazYGtHRDO17FQl1sF775bahCf4 T0CFsvLXa/Qg/Wt1o9A6OMhZ8UVk3kovP/s4TIEDYLraWeyugO9amJDyCi/tYlID Shto3Z/JJeXa3sfs2ctVQ== 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= 1761207912; x=1761294312; bh=HyBdkLTFUl/wICqXHuFKclztMe/9O6n8+lW TKGuYEW0=; b=iGhWMekUjhwTn8emPFBkvpvtrzdGf4aEFzpiL9DBo04GttJdPsF EYrawCycI3HZYNz/qSDebp6OMmtPvqFDeZuNN+2hvmOmqCL8THZhBZ4aEIXZqi/7 80ryaofaF8cTE/yme36mTJxjjtL7X0vhY6pZDVqg+jFdtsag46QxcoyVpjiwYTSD cJXz6R1SkxfJKCw+IPDCfqJKJufJz5dmVEPWaQitCOWblhY2H0UB/I+f0ID1LMnZ jNNW62Ndf2o+vT0hLa4BDMhnfq9OTaTvNp58AYDkbLxJ6hBoo5xVoNAawYVm/TPm E8CxYvLqkMU3uJHDFysxu0eaG2gu908mo7A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddugeehleejucetufdoteggodetrf 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 4A80F182007A; Thu, 23 Oct 2025 04:25:12 -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: AQpA1KTaY2GJ Date: Thu, 23 Oct 2025 10:24:52 +0200 To: "Edmond Dantes" Cc: "Aaron Piotrowski" , "PHP Internals" Message-ID: <206f361b-f3dc-4198-aa61-24ef358687d8@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> <151800a7-1094-49bc-8e43-c593a74741af@app.fastmail.com> <772a457f-69b6-4a76-8224-081917d719f6@app.fastmail.com> <8c20e8cc-cec7-4aa5-b6a7-663ef8159e1a@app.fastmail.com> Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 Content-Type: multipart/alternative; boundary=1fc6d23812a7451fad0decc237d95746 From: rob@bottled.codes ("Rob Landers") --1fc6d23812a7451fad0decc237d95746 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Oct 23, 2025, at 10:04, Edmond Dantes wrote: > > Nowhere in the RFC does it explain how await() applies to the Awaita= ble interface, it only specifies it in the context of a coroutine. >=20 > Which aspect of the behavior is not described here? >=20 > RFC: >=20 > The Awaitable interface is a contract that allows objects to be used > in the await expression. > The Awaitable interface does not impose limitations on the number of > state changes. > In the general case, objects implementing the Awaitable interface can > act as triggers =E2=80=94 that is, they can change their state an unli= mited > number of times. This means that multiple calls to await > may produce different results. >=20 For example, it describes: > `await` suspends the execution of the current coroutine until the awai= ted one returns a final result or completes with an exception. But it doesn't explicitely say that it happens for Awaitable. For all we= know, it doesn't suspend anything unless the value given to it is a cor= outine. Since Awaitable doesn't necessarily have a "final result" or "a = single exception" we know it isn't about Awaitable, but about coroutines. =E2=80=94 Rob --1fc6d23812a7451fad0decc237d95746 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Thu, Oct 23, 2025, at 10:04, Edmond Dantes wrote:
> Nowhere in = the RFC does it explain how await() applies to the Awaitable interface, = it only specifies it in the context of a coroutine.

=
Which aspect of the behavior is not described here?

<= /div>
RFC:

The Awaitable interface is a con= tract that allows objects to be used
in the await expression.<= /div>
The Awaitable interface does not impose limitations on the num= ber of
state changes.
In the general case, objects i= mplementing the Awaitable interface can
act as triggers =E2=80= =94 that is, they can change their state an unlimited
number o= f times. This means that multiple calls to await <Awaitable>
=
may produce different results.


For example, it describes:

aw= ait suspends the execution of the current coroutine until the awaited= one returns a final result or completes with an exception.

But it doesn't explicitely say that= it happens for Awaitable. For all we know, it doesn't suspend anything = unless the value given to it is a coroutine. Since Awaitable doesn't nec= essarily have a "final result" or "a single exception" we know it isn't = about Awaitable, but about coroutines.

=E2=80=94 Rob
--1fc6d23812a7451fad0decc237d95746--