Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126789 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 6CBF51A00BC for ; Sun, 16 Mar 2025 18:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742151345; bh=IPpdPZMtj+OY3hQNgXhAMYfXbAnWbb9JgALQCZVv3uE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HdtRKRI5xrH4CJw0NPIcYxdrzV1vuqEJDPo1q9FvSiUiK2z/G+msrplMRY6xs7Phj YxPSX7lG4FJiGxS+fuO2f66kRisXnO6SHDIKxTnGZrhZgR2d4eNNPOJH/dDnIMRtK+ ur1OLqvwarjmULcMLVm6ZMf+tno9YYt6AYdQrtm0sAy48Txf+WBAtiB9W4jLIFf68a ZYwPQ3J+NvAvLH5rFCj6vXWEDOBF8Lz+LOOZHry0z9vwP2IqTZ1wtRTCWudXaDDzxH 7ZCqNWNKhPWjyP4SB+rjGzrkl6zDE0YKmb96+SrPyRtnjwUnNRNCqramTbuOyh2ej2 mhlf82FLjsTrg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 244A0180072 for ; Sun, 16 Mar 2025 18:55:44 +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-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 ; Sun, 16 Mar 2025 18:55:43 +0000 (UTC) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-ac2c663a3daso81669666b.2 for ; Sun, 16 Mar 2025 11:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742151495; x=1742756295; 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=D2YEoZaxgWqYc47DkUX3y02TbPISErsyHOao/xerMP4=; b=Itqpl/PtFEVnfuH4HRhz7B4ZuFYmW54sdQ8oN34OPuB0WsLEehhezVYTQsBv/wU3Q4 cv5ZmB5DvhEWsZmbg9JKzhQTAwRjW8VRegKDM+VRDDH8qYPPGpjZ1Iprt71KsiQJWUIZ 0QgV34FK6r4VQNq7DqOP0j5S+YDBsCz6dYUHKL2vjzTBae/aXPj0ZIoNs9Nlzm6t7GMC Fx/uf77ndcgNjwFQdAlnUt/qCfloAHPONYz4WvHrmoltg3apK2UpD98mH4PfFKjeoK0y DZtfhj6ktZ2yVeSulwy3vnF1PBRcvuhmC4JGDvNDV9VxSb7RMZjz3jVuuC7fm3qy5Xvl v7Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742151495; x=1742756295; 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=D2YEoZaxgWqYc47DkUX3y02TbPISErsyHOao/xerMP4=; b=rQcuvTIHVEw35C5XoJk0rNmK7xiwq4FZgkYQiJdB6/Cn5TcB/58olzlQu4ir9rknM0 nTo7sNbnoZGCyKAnKoEGdhdWUbqhGBeP0NENkyUMdT6qSD93+SoTqrKEo6sqBY2nf2L+ NOjDFiuS6aF3MGSpjTwTblqHgIzkVzVzP5zF0d/HStGkE8+N8HjK8sw0lZ5ubAUQTD0E /TJP0/9kHS6tLyfWmqZ4eRTcW2oC4h2a/zKluPAYVPHKriPo2qVHxcq681yv9WBiBzXo egoWhqRgT1Ezowe1Nk55JOyduBmSx1d6WJuLq7Ucd1MBnqDqZuab1t2g51KrQtH4Dmnv oiwg== X-Forwarded-Encrypted: i=1; AJvYcCVKn4tKFcsy5J3iMR8pchKI1q5lUsQR8Ibxbjv7kylFzC1HIba73090b2QguQ5x0FrAd45vttD/3ek=@lists.php.net X-Gm-Message-State: AOJu0Yxsi0rTOrrYOFBkRrSL+bAJsPFL+k3xUQNAdzgk+/EjNf04CuFq deG4cS8hemjnimEmUMwMX7SSF67L3wB4w1mhmQ3fvQJlRH5l7anF15s+gdq+FAvSHddQPP9DZRA I/IGdTEq6aHQSnPrJQoUlta65IdM= X-Gm-Gg: ASbGncuFHWrUdapvGxTMaDRWQDu8QWR/BH2Xvzawps/kiNYIsXevPcmYCCLsjGH5ddX 9EazIQ6R3DambM4dD7Q1VrtXPdRVxNqYJW5DTgUKFClhXtl+Mla0Oxnk7NSVYeSCTHvxd62x7xv Li8LZCKx5AphoV8a2udUAGf9kEHg== X-Google-Smtp-Source: AGHT+IG8FNau5xESvTI+xROIQo8hT2RJtMYtnYVPyUCFtrp0Bt3CV4GCqSjyvRs5oNjdDs++Tanm6DDM0l7HHdgaqsQ= X-Received: by 2002:a17:906:7316:b0:ac1:fcda:78c1 with SMTP id a640c23a62f3a-ac330263c7amr1178457966b.34.1742151494465; Sun, 16 Mar 2025 11:58:14 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 16 Mar 2025 20:58:02 +0200 X-Gm-Features: AQ5f1JpxmaduKAfCP4os_ZMAhUbftcAZid3m7ffqqztVaDuheMQ1q7rIOTp3ezw Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC - Stage 2 To: Edmond Dantes Cc: Oladoyinbo Vincent , Bilge , php internals Content-Type: multipart/alternative; boundary="000000000000f901c506307a40e3" From: i.miroslavov@gmail.com (Iliya Miroslavov Iliev) --000000000000f901c506307a40e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Edmond, async stuff is like having another thread. So "spawn" fits but also "throw" in terms of what it does. At least what it actually does (at least what it must) at a low level. > The `spawn` keyword maybe the right keyword to use but it seems more weird, can we find another keyword to use other than that? Spawning a child thread means you don't care about if it will ever finish. The main loop may finish before it receives something from the child process unless it's instructed to wait for it and the child process will just die. For me the "spawn" fits On Sun, Mar 16, 2025 at 8:35=E2=80=AFPM Edmond Dantes = wrote: > Hello, Vincent. > > > > > Personally, i love the formal RFC for it's low level accessibility and > this new RFC isn't that bad. > > > If you mean classes like SocketHandle and so on, then the low-level API > can be available as a separate extension. > > > > > The `spawn` keyword maybe the right keyword to use but it seems more > weird, can we find another keyword to use other than that? > > Most languages i've seen make use of only the `async/await` keyword. > > > > Yes, spawn has the downside of being more associated with threads. Here > are some other possible options: > > - launch =E2=80=94 like in Kotlin > - go =E2=80=94 the shortest option > > async is not the best choice because it looks more like an attribute, > while we would prefer to use a verb. > > From a brevity standpoint, I like go, but after that, Go developers will > have to implement the $ symbol for all variables :) > > --- > > Ed. > >> --=20 Iliya Miroslavov Iliev i.miroslavov@gmail.com --000000000000f901c506307a40e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Edmond, async stuff is like having another thread. So &quo= t;spawn" fits but also "throw" in terms of what it does. At = least what it actually does (at least what it=C2=A0must) at a low level.=C2= =A0

>=C2=A0 The `spawn` keywor= d maybe the right keyword to use but it seems more weird, can we find anoth= er keyword to use other than that?

Spawning a child thre= ad means you don't care about if it=C2=A0will ever finish. The main loo= p may finish before it receives=C2=A0something from the child process unles= s it's instructed to wait for it and the child process will just die. F= or me the "spawn" fits<= /div>

On Sun, Mar 16, 2025 at 8:35=E2=80=AFPM Edmond D= antes <edmond.ht@gmail.com>= ; wrote:
Hello,=C2=A0Vincent.

>
>=C2=A0
Personally, i love the formal RFC for it's low level accessibility and = this new RFC isn't that bad.
>
If you mean classes like SocketHandle and so on, then the low-level API can be available as = a separate extension.=C2=A0=C2=A0

>
>=C2=A0 The `spawn` keyword maybe the right keyword to use but it seems more weird,= can we find another keyword to use other than that?
> Most language= s i've seen make use of only the `async/await` keyword.
>

Yes, spawn has the downside of being more associated wit= h threads. Here are some other possible options:

  • launch =E2=80=94 like in Kotlin
  • go =E2=80=94 the shortest option

async is not the best choice because it looks more like an = attribute, while we would prefer to use a verb.

From a brevity standp= oint, I like go, but after that, Go developers will have to im= plement the $ symbol for all variables :)

---

Ed.<= /p>



--
Iliya Miroslavov Iliev
--000000000000f901c506307a40e3--