Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129423 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 C03641A00BC for ; Mon, 24 Nov 2025 01:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763947124; bh=l2AVpGJ4sgfvWj+yKYP9hSrBvAJypHx+RD9Fkn2XREQ=; h=References:In-Reply-To:From:Date:Subject:To:From; b=m32AUCecz0Yb4r2RDXBVpfw3rJA47wl/tDpCqslp4mZXOE5z+JKi4OqVISk9iiCyX L+pU48pEgRArOJU1Unemp3DVcoz9dNQ1ZaHgaIaIv43eLWttdTtDyjPuwpJ6YVDdYw ug29OlP9y14uKGyD7nbEVEkHILeo2hCFPXztrkD76E1tENee+mplvpegjLMk/JbNbx BlxPpjmvCurk2IU4csrlpvwB6yYUsO65UgucaaYM+fbPoX7U2bWf2MiUxRDKQqn2Yx qHzbTBiivjO2go+YmxBUwOgeJFpHiz3iXrWgF6jgrkJlj3E4GpQU9J+nkFlEbhn8Qc DHpQdERo9uGHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 63DCF180041 for ; Mon, 24 Nov 2025 01:18:40 +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=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_H2,SPF_HELO_NONE, T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-yx1-f54.google.com (mail-yx1-f54.google.com [74.125.224.54]) (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 ; Mon, 24 Nov 2025 01:18:30 +0000 (UTC) Received: by mail-yx1-f54.google.com with SMTP id 956f58d0204a3-63f992aa183so555930d50.3 for ; Sun, 23 Nov 2025 17:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763947104; x=1764551904; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Mj9aXi48oxQiFEdVsk1Drjw3Z+tv9ADQxVw4nqKr9Ug=; b=DifhGbVi7GZQUv7bJ0fvO0sG2rO2kjGWxeRuQXpuRoIRXpazD0ld4yYeNi87SO/lZ3 uRZ9QeF0jEIFcBWmchaon3QZgjVO5pEut1yWQS2AATe/UgadmmZf5zp1HDD+6RkcsPy7 bv0UjeNfQZulEVa+Sdw6pbnWQ0KE0IAIp8m84n8EhgQur8hoXGL7c5z4Oap3C7xfQqs8 io/xLXnJ0xBxs9MsABvLiZ1oru5IkNkxeIGHoa/188jXsg64olvyMYFU48taOVQLoTOj nhqkT2msDZ87u/WtrmWsNU400mF4eAjG0x1LGJNjNNDhRubDegxb8KAJgBMU+NQ7XNi1 LJWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763947104; x=1764551904; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Mj9aXi48oxQiFEdVsk1Drjw3Z+tv9ADQxVw4nqKr9Ug=; b=XLiFg5k4EiCiLmBNgKNf/ROXc3eVuE3W4OGMRSHRhAeSIDfmG0zfpIgJ7IgSTiKDzd 0ASZgsifFHd/vpgAr8EN0VpX8zb6+60Rmr0iWCp9Jv4ovfr4eImmeCTyUsP3UB+x2SSf q5eV4dGvhKYpveNJ4M7auiaY8V/AM4PiWzTym/EEX8tMKdRCpsjiLOiMtnvUGMAGh1vb FrRPoJA67gpuq/lsIRXY+ZBgWktbF9b9Pqr2ChwOimr2Vh99eSLwEHqXkTDH13Jnk4hQ TEcT03wrIXWOBMqgX3AHPWQZZ1HgFVAXyc/o4PbksOv8OqY9FStzdLZ4ff4XQ0ggaxZi lJTA== X-Gm-Message-State: AOJu0YxalwbnN+//wr+979oo6O9xmyxJJZfZCy03kyytg/arO7HshUl2 ijRLRqMteObbnlMrbseDudmISoDaEJc/w061oVTU6VacZtN2mkCjB0zv/JC2hgTJuNZko9D3AlF tisL8BRVHO92MjhNpOYpDzeZnCajr395upndY X-Gm-Gg: ASbGncuhXZuXZD25cTAJ9DIvNLumETTQqi4VZO3+CFf2zAI+AjfaSibVXltv8rpGXZa YyGttcwFkqTUIvGr6BFQLTUwR9GkvATXU/r/RWre3FvPcaCMLCGnxy0SifJPIv32XONwsq7LFgv QcmSX74HDCkZP/hfR7gbO7sanlIapJvXzDNPQmNCjC3bBzLICNl3JPYyF/sTUMzRxnNABH6oCou 1+5OXQUL7qSUpJyfPEIh5bb+lqP5baQJ40gHQDR3m+rb6Q0VLWDGCc5a0eM1LEJn3t87ruEmv+c SF4VJchwVhYJV5LR1QBgO2BKBcI= X-Google-Smtp-Source: AGHT+IGpBKxFboOvr0rkjmx9eGCN0t9ajK8PP4jtb++7eGlAHa6MTKW2HbEh+Uw1FWHX/oRygUcOXE1tPdPVde4rwao= X-Received: by 2002:a05:690c:8687:10b0:78a:a474:70fc with SMTP id 00721157ae682-78aa4747854mr12441657b3.9.1763947104293; Sun, 23 Nov 2025 17:18:24 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <691963327.399484.1763796022993@email.ionos.de> <1402906904.784903.1763811759896@email.ionos.de> <2015208655.784984.1763811978476@email.ionos.de> <980296152.1071.1763813573083@email.ionos.de> <92865666.4510.1763818506332@email.ionos.de> <329450798.8037.1763822426377@email.ionos.de> <9287c46c-bc63-4dd0-9792-0f9421959589@rwec.co.uk> In-Reply-To: Date: Sun, 23 Nov 2025 22:18:13 -0300 X-Gm-Features: AWmQ_bmYWflXkaKyze5pqJdS-vyT3nC-nx_P3wQUEpceV4MRVPsjBkJUKgQi_RU Message-ID: Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000008dd62106444cf084" From: deleugyn@gmail.com (Deleu) --0000000000008dd62106444cf084 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 23 Nov 2025 at 21:29 Lu=C3=ADs Vin=C3=ADcius Santos da Costa Barros= < luisvscbarros@gmail.com> wrote: > Hello, > > I have serious concerns about any approach that may cause the event loop > to block. The correct ways to handle this should not involve blocking the > loop =E2=80=94 whether globally or in a scoped manner =E2=80=94 while att= empting to let > synchronous and asynchronous code coexist in the same environment. More > appropriate alternatives would be offloading execution to another thread > (which is far too complex for the current VM and ecosystem) or relying on > preemption (which is not feasible to implement here). > > In addition, the cascading effects of such an approach are significant: > libraries would be forced to implement internal mechanisms just to deal > with unexpected loop stalls and similar issues. > > It would be much healthier for new libraries to be designed specifically > for the asynchronous environment, in the same way Laravel created Octane = to > run on top of Swoole. > If I could summarize months of discussion on this RFC, the primary topic would be the consensus that we do not want to have a split in the community. If every PHP package needs an adapter to be async compatible that essentially means the efforts to not break the community in half has failed. A different way to look at it may be that it=E2=80=99s not so much about bl= ocking the event loop, but rather not even having an event loop in the first place (in case you=E2=80=99re running sync-PHP). And if you=E2=80=99re partially = running async at an isolated area, then once that returns and all coroutines are finished the event loop may also finish and we=E2=80=99re back to sync. > --0000000000008dd62106444cf084 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, 23 Nov 2025 at 21:29 Lu=C3=ADs Vin=C3=ADcius Sant= os da Costa Barros <luisvscba= rros@gmail.com> wrote:
Hello,

I have serious concerns about any approach that may = cause the event loop to block. The correct ways to handle this should not i= nvolve blocking the loop =E2=80=94 whether globally or in a scoped manner = =E2=80=94 while attempting to let synchronous and asynchronous code coexist= in the same environment. More appropriate alternatives would be offloading= execution to another thread (which is far too complex for the current VM a= nd ecosystem) or relying on preemption (which is not feasible to implement = here).

In addition, the cascading effects of such an approach are si= gnificant: libraries would be forced to implement internal mechanisms just = to deal with unexpected loop stalls and similar issues.

It would be = much healthier for new libraries to be designed specifically for the asynch= ronous environment, in the same way Laravel created Octane to run on top of= Swoole.

If I could summarize months of discussion on this RFC, the primary topi= c would be the consensus that we do not want to have a split in the communi= ty. If every PHP package needs an adapter to be async compatible that essen= tially means the efforts to not break the community in half has failed.=C2= =A0

A different way to l= ook at it may be that it=E2=80=99s not so much about blocking the event loo= p, but rather not even having an event loop in the first place (in case you= =E2=80=99re running sync-PHP). And if you=E2=80=99re partially running asyn= c at an isolated area, then once that returns and all coroutines are finish= ed the event loop may also finish and we=E2=80=99re back to sync.
--0000000000008dd62106444cf084--