Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126648 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 130271A00BC for ; Sat, 8 Mar 2025 13:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741439682; bh=Z7kjloSk+5k/Zf5N+5nexFMAjcTaoan0qqJqCN2V7Gg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aVx3WwZX48FdKEds+tT1NctbY1PQ63B7gAHurv1ATnTtVPVZk9Wz6yWhGZGniO4KY 5e67Qap1BEphEh14tHNQ4xkikwpONHzI6iM+K7ZsGCkDWdjnkEpT+L3ErtCb5UETte KlJolPOeuRtz5NiKv886qIM7gSfMxxRiKXWLVBh2TwvHpJNccMyshnUjtrwPMaZION kRdGvII1aBwEeTPbungH4Hjuxy8uQEOYN1wkyo8VUCs7abdUjmH5dGKfQT0DDkD9oP n/He30RzIrogf2dzfyhIfAZDtX07HLcCRVWi+iEilwukDbLf7GhfX1oFxNxazbKjU+ 1qZzmgnnGIX6g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DC11C1804C7 for ; Sat, 8 Mar 2025 13:14:41 +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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (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 ; Sat, 8 Mar 2025 13:14:41 +0000 (UTC) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2fec3176ef3so4114588a91.1 for ; Sat, 08 Mar 2025 05:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741439835; x=1742044635; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z7kjloSk+5k/Zf5N+5nexFMAjcTaoan0qqJqCN2V7Gg=; b=DlAC+C1i8KUdIzdYjJZLu9lU7bzm+fIiUNiID/Jh+2PMY4H6si9Aj5hAwxaen+h5e1 0NJZaEH3FvUuA57pbMDGMAatadf1UNRu3loa2kk6asDxfVzOKmNRjjPDDmHxOQbJshD4 wlBx0fugQ5Z2D8EX3BPXCRFDIGCFYx+puXA1/gG7JXlnyjtfDad0VuTfgoxMXNcoHv6J 9MV+7J9lTgtinsRMYWvdtqqiFCwMEzXfi7VxJpTb9Kn2oy9Uhlh93aWlyTKkzl2WUpmm +Plmd4bFBpfn7BlEWwDZddctK88t5aa1eufwQP4HXUJJ+BEvRnUEqCw63m/8N0DHSQ6a n/EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741439835; x=1742044635; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z7kjloSk+5k/Zf5N+5nexFMAjcTaoan0qqJqCN2V7Gg=; b=jz8TELzjey3QLjKJD6xtwzqCRhdTb6dtlBDe+jnFgNm7eSwOofgAftyfJ361YnXBV/ d39hN20S2HBiOPIdSEoEssSEOOrc8+GD0hdcXmFMWt08ryjS0Yn0vBN6ExrywdFuUnyr 5euCRU0AKwMzH6bHyqBgoUj21McCDO6E453FnpFkstyqe1gizjSjCbZfgZKi0YWOKCJS euP2p0qzMKvRW2BZFjh+amQeWhAx0mYDQaAwAb3QKXHOqEMIS9iieaRlamxNmvF/w7dz 3InUK5l118X/ICjNAaYBHaMrF+O5Ts7WpTcjP8DmqH0KN1a6JMAa1ZfAGTUWSz+7/IUz vUvQ== X-Gm-Message-State: AOJu0Yz8nFf1Y+nIF8mmiGpt2ElBu8pS97qF2vYm9+94QSflXUUO3hww BY69nqlStr1DRdxg+0gZbgdhPBOZd2QPqzAO3kgt+KFHv6DG0FGZfz7Ty+Kt1kFROTeRo0rVQL3 5kYEzzkSZACCQ0SYDnniO3/fl4+m4oUiE8uI= X-Gm-Gg: ASbGncvZV0Lai5T6d0M9j/EelD5kb8bb2UQUdHAycOI9nKjjG8u/PFIUbEQw9pB9TEs 4NaCcZ/ays+oxi//Vfq900JzDgheQUiK1rDEbxGK9fBjcAvGX15qU0lCmgXnsBz5+SdB5GTApjM 2BdRjot9QF06P67iFDpwfd/x/9y8keszHDozMe X-Google-Smtp-Source: AGHT+IHYfmzDF8GjHNizTU3nsgmYotEJcvEMs99ysHhGsE9t+tpQxl+Q70DvlMO/svg37jkPQE1Dan4BmOYYXiJeGgs= X-Received: by 2002:a17:90b:3887:b0:2fe:80cb:ac05 with SMTP id 98e67ed59e1d1-2ff7ce7ac2bmr12251221a91.9.1741439835141; Sat, 08 Mar 2025 05:17:15 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <9964db8c-0ffe-43d5-8246-47fc76b07180@app.fastmail.com> <78a03dd0-fd4a-4f4a-ad8a-37e5704f06fc@app.fastmail.com> <08c8ad0b-e8f4-46e3-99f0-b80748d40b89@app.fastmail.com> <07973EAE-2D83-47A8-8FA0-84286C77C02B@rwec.co.uk> <48d66433-3ae9-4895-8361-7c81a0a3670d@app.fastmail.com> <8599eb8b-d4a3-4cb8-899a-25b134e0d64d@gmail.com> In-Reply-To: Date: Sat, 8 Mar 2025 15:17:01 +0200 X-Gm-Features: AQ5f1Jr7SazBNqVwZBb4aRs_ntX5ori78UQL32Q2zu1TuQH0lwTV3KH3bvgg_DY Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC To: "Rowan Tommins [IMSoP]" Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000c57d13062fd48e46" From: i.miroslavov@gmail.com (Iliya Miroslavov Iliev) --000000000000c57d13062fd48e46 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't want to get involved, I'm giving just an opinion. If my wife wants me to get a present for someone and she wants me to get it wrapped up in either "green with orange ribbon" or "blue with red ribbon" (strictly) but I have to buy them separately from a different shops. If I buy orange ribbon from the shop that sells ribbons because it was open early and the other one was closed yet and the shop that sells the wrapping paper tells me they sell only blue, what should I do... kill myslef or go back and try to change it? On Sat, Mar 8, 2025 at 3:05=E2=80=AFPM Rowan Tommins [IMSoP] wrote: > > > On 8 March 2025 10:44:35 GMT, Daniil Gentili > wrote: > > >The only thing that's truly needed in this RFC is a set of > synchronization primitives like in golang, and a way to parent/unparent > fibers in order to inherit cancellations (as previously mentioned in this > list), not contexts, async blocks and colored functions. > > The async block as I'm picturing it has nothing to do with function > colouring, it's about the outermost function in an async stack being able > to say "make sure the scheduler is started" and "block here until all chi= ld > fibers are either concluded, detached, or cancelled". > > It's roughly equivalent to calling the RFC's Async\launchScheduler() more > than once, but I imagine the later calls would not actually start a new > scheduler, just track a group of fibers. > > If we're building this into the language, we're not limited to expressing > things with functions and objects, and a block syntax makes it trivial fo= r > the compiler to detect a mismatched start and end. > > Regards, > Rowan Tommins > [IMSoP] > --=20 Iliya Miroslavov Iliev i.miroslavov@gmail.com --000000000000c57d13062fd48e46 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't want to get involved, I'm giving just an o= pinion. If my wife wants me to get a present for someone and she wants me t= o get it wrapped up in either "green with orange ribbon" or "= ;blue with red ribbon" (strictly) but I have to buy them separately fr= om a different shops. If I buy orange ribbon from the shop that sells ribbo= ns because it was open early and the other one was closed=C2=A0yet and the = shop that sells the wrapping paper tells me they sell only blue, what shoul= d I do... kill myslef or go back and try to change it?

On Sat, Mar 8, 2025 at 3:05=E2=80=AFPM Rowan Tommins [IMSoP] <imsop.php@rwec.co.uk> wrote:


On 8 March 2025 10:44:35 GMT, Daniil Gentili <daniil.gentili@gmail.com> wrote:=

>The only thing that's truly needed in this RFC is a set of synchron= ization primitives like in golang, and a way to parent/unparent fibers in o= rder to inherit cancellations (as previously mentioned in this list), not c= ontexts, async blocks and colored functions.

The async block as I'm picturing it has nothing to do with function col= ouring, it's about the outermost function in an async stack being able = to say "make sure the scheduler is started" and "block here = until all child fibers are either concluded, detached, or cancelled".<= br>
It's roughly equivalent to calling the RFC's Async\launchScheduler(= ) more than once, but I imagine the later calls would not actually start a = new scheduler, just track a group of fibers.

If we're building this into the language, we're not limited to expr= essing things with functions and objects, and a block syntax makes it trivi= al for the compiler to detect a mismatched start and end.

Regards,
Rowan Tommins
[IMSoP]


--
Iliya Miroslavov Iliev
--000000000000c57d13062fd48e46--