Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126651 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 E97D71A00BC for ; Sat, 8 Mar 2025 14:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741442266; bh=ibYKPoWxG4SvNv4T/qFxPNVw5cIicgrwTDxQdx8UMsQ=; h=Date:From:To:In-Reply-To:References:Subject:From; b=b+jcQgtzt9h4Ei9L0B+B8niFaD7e8PKi2VXZyMvHWkyPED8rfPuTUkdbShDdAlkoX hHyszQi/suz6QMWHN2ZilnDNcwHP1YOpNd+iXIIhuKPOJ+IRVUWItwueyaeJ9OGFdP cly0PSnMTkmqXgUmI3nPOwxXHrgc94G4IlLXCEp+FpTwfmhS4bM5gc4v5O1L7o6SGn F22klmIvX9Qm7og1sRd/XmkR5o9+U5JDF44xbtR2+XBzJpmjDumXbGX4t13LFtUCTz FQ9XWrlIX5dzhj3sTlwGwCJzVHbFTKadKepSquGvVgshA9TKPCJnl9NkIfsMquM0Bc 7cLG0hRTv7+Hw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F1B44180637 for ; Sat, 8 Mar 2025 13:57:45 +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=-1.2 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_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.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 ; Sat, 8 Mar 2025 13:57:45 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5e4f88ea298so4863433a12.2 for ; Sat, 08 Mar 2025 06:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741442419; x=1742047219; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=goaAXtkeecsn/no3TOblrS2ltYz1q2N+C7EEIBkiRK4=; b=TXouSLcPHJh++N2SKcl1PR9Mlz8lL/boiCCECO2QC/8j+LjaH+FBtSAEEsWkogly6b rcHFADSG2I7vDfCq1gF1EyptPKdKgBhoqAsAq0rn5fVMzWAjRRbHUT6C63LZ3AG7QFtR /hP3CvlkCvUObk6AkAPgryi/r384gVSqspiyseveiGNyfGDa3EAY/RegPwodXx8qaE84 9Sx8n60uCcr2KJHKlNSIM4iGoATV0ScibcJ+sLcWBNRRJsr0U6ua1p7KG62nBFTOU6Wj 95eiup5udtaYX1WIgUIcsyofL6jhRDlFyK5hN95H3c1/CyqC936plA7zZ62Wfa5cfQsE 2egA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741442419; x=1742047219; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=goaAXtkeecsn/no3TOblrS2ltYz1q2N+C7EEIBkiRK4=; b=BylZyaEZqcTxExPteCGiDWKFgyKRAIYH9y4b8DT9gry7f6NfoWdSsFuThhi163yzI7 Or1nrUSpJo0mxST99gfEGpGt5hxm0DBgDSox8uEPR9nXPLqx1ix3n1geceBYsyVwLmqz G4Aa0AC8YLsY7H4Mw/HSLlvGzlctOIj9Fa29mvXAE8aQ6fgg9EFrwUnA/jsrgnW7L2/T x16bwRBP/Ut0iAMFdClXPLyxB9JC4gY6udEONW/KQhDJVKt0TTthazgJa+nIWtIxBx4U MeMAGaLDxHT7wR8Az2Cl0w8yqvBe9GwxBXnCib3fQsDxFboxphDgf4UeMP8eG8vycFXP IMZQ== X-Gm-Message-State: AOJu0Yz3sG/COmMAOzV6GiTQoSW5aAIbxwbfhLbLZCtBJ0FS+lU7hsAe 5c5Shkdk44NrnXMBb/wqL+odJAWCBmx7tLnMB8mBzMPzZPf9OzhxIhUm6w== X-Gm-Gg: ASbGnctSlyvfcwj6XOdJTINZfRcWc5K9OMsQZ4Uf8r6cTRHj96GNej6DpatTXAc+c3P C0zQZTovWlEWJt4AHYKiJGilWNKhX+o+HXYUmzyLU511us3gGomqzlXYJwyUe/+HT8wi3JMDSIA LwUu3atRbZvAP9JglnZxKzgK1fc5en3paOJSxtbTGVABYJEjTepzBXCn0vahtvSz/CQIgvD6+Kv qdJi7K4EIhxN6E+7pi9UHgHuhrO6YT2vrX+zAajs0XW24ubOlLDTP7nKhWEoxMntyLby5hjvQBy MbwnR7we1FvSS/Hmh9OeXp0IsN4oVrfavwdVwCUTm/IWEaYkVKWw9xJTeXY= X-Google-Smtp-Source: AGHT+IEhdhvwUeFPp5vxft2rTxp2NU00VgAvyCRXNVgRt/yWCqvKpeTwFgOHmBTK5/dy9Y8qdHUXHg== X-Received: by 2002:a17:907:8b97:b0:abf:75b8:cb38 with SMTP id a640c23a62f3a-ac252fb8f3cmr810221066b.36.1741442418782; Sat, 08 Mar 2025 06:00:18 -0800 (PST) Received: from [127.0.0.1] ([78.210.108.99]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac239437fb2sm447772666b.17.2025.03.08.06.00.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Mar 2025 06:00:18 -0800 (PST) Date: Sat, 8 Mar 2025 15:00:14 +0100 (GMT+01:00) To: internals@lists.php.net Message-ID: <9a2e81e8-3534-455b-879a-5a45c85b3ba7@gmail.com> In-Reply-To: <9b7ab30f-5ed6-400d-b941-1291e9185286@app.fastmail.com> 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> <74c4c726-63aa-44e0-84c9-840e13a65a4f@gmail.com> <9b7ab30f-5ed6-400d-b941-1291e9185286@app.fastmail.com> Subject: Re: [PHP-DEV] PHP True Async RFC Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10_4137397.1741442414931" X-Correlation-ID: <9a2e81e8-3534-455b-879a-5a45c85b3ba7@gmail.com> From: daniil.gentili@gmail.com (Daniil Gentili) ------=_Part_10_4137397.1741442414931 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > As far as I can tell, the entire reason we are talking about this is because adding the event loop changes the behavior of existing code. So we cannot "just turn it on". > > I haven't seen an explanation of why this is the case, but that's how we got to this point. We need some way to "opt in" to turning on the event loop. This also seems like a very bad idea: there is no reason for the language hide concurrency behind an INI or even worse a compilation flag. Existing code may not all be free from races, but the choice should be up to the user, not the hoster or whoever provides the php distribution. Enabling concurrency by default will allow gradual addition of fiber/threadsafety of codebases, as developers will know that concurrency is a (very easy to use) option, and will hopefully want to prepare their codebases for it, and after that happens, it will be even easier for users to use it. (And actually, this is already the case, as fibers were added in 8.1, limiting the userland scheduler makes no sense now that (thankfully!!) the cat is out of the ba). Regards, Daniil Gentili. ------=_Part_10_4137397.1741442414931 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
> As far as I can tell, the entire reason we are talking about this is because adding the event loop changes the behavior of existing code. So we cannot "just turn it on".
>
> I haven't seen an explanation of why this is the case, but that's how we got to this point. We need some way to "opt in" to turning on the event loop.

This also seems like a very bad idea: there is no reason for the language hide concurrency behind an INI or even worse a compilation flag.

Existing code may not all be free from races, but the choice should be up to the user, not the hoster or whoever provides the php distribution.

Enabling concurrency by default will allow gradual addition of fiber/threadsafety of codebases, as developers will know that concurrency is a (very easy to use) option, and will hopefully want to prepare their codebases for it, and after that happens, it will be even easier for users to use it.
(And actually, this is already the case, as fibers were added in 8.1, limiting the userland scheduler makes no sense now that (thankfully!!) the cat is out of the ba).

Regards,
Daniil Gentili.
------=_Part_10_4137397.1741442414931--