Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126432 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 B8B5C1A00BC for ; Mon, 17 Feb 2025 18:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739818255; bh=qm+HcJYs8QMolttQMtCSuOLcvUEK7N7qdvTnpqeEqsQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AWB9e6qcZjsoQNoXmIMd3rFEDvB7/aPY14IZg43j/wGrxGXK+chMJvGJqdiHGViXi xjfGtD2K14woTZVYq907N5NZY/iPCfKPRO0VHr12pQZcsPmXJ7aCH5vcC963AzwkFM QiBr7kitTXn35vYQk7GvAF6F/jJoXIkHmUPI8OGIb44CqyTbo/DxIDE8D7COfuQhXT bfdv+NvWHxTwjD39XUF4FwetYXSxCoEvwfoNbnT9MM1XULNurkLSSSrY0Jj6HisPzq gvV9QrN2sozAe6C6KACH2YhvuSjcaRfE20yFFbjTEdmqgQMyPpRrjNgYknPONu6NgD o+KiVux0TWVqg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 67DD61801DA for ; Mon, 17 Feb 2025 18:50:54 +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=-2.0 required=5.0 tests=BAYES_40,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-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (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, 17 Feb 2025 18:50:54 +0000 (UTC) Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-e53a91756e5so3675846276.1 for ; Mon, 17 Feb 2025 10:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739818415; x=1740423215; 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=xfrkUsMTYKp9uCjhf0qgViumFpvO2ZAL9TuOJHTtLUg=; b=L4nlklqgo0sbQ6ZJ+E3z8GQZsQBvcyemRYyztev6rGuJuY5/vYTW1VjlH7Odo9vDRt ZJ7RK3dNOPZ9s4eJQMzZ+RlZqGmPYyJfbIIA3+wf6/coqi47KFS8NSkGu9N6m7K7U5JY qsJSupSUgN2i5001PTstMHYt+8mGP7CHTMz+zQid47QVBcqpN7JR5UmzQTnxjc2fu+/1 60UaK0VDVJUx328FHDNt2hM+MeVPmbYZrBy5tcdE7FSX3+OtQMgr8xYcfex1fUvXaxbf CpDDZzVv/WDiM0sYRiRUFH7xuOqY7DsfwTT5OFY/mZDbhAW1xlvXrytyStYAFsm5WdHi Ifsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739818415; x=1740423215; 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=xfrkUsMTYKp9uCjhf0qgViumFpvO2ZAL9TuOJHTtLUg=; b=YHcWPR7IaLtPd4EX7DNBDzqDqDdGbgCijtjkd0pyipQrxKVlUH9eSlxRELBPYbNr5m tNc42rhlGuOaYmEkadqZNhxnO9qvxW3SmVFunJv+zWryhPAgcQuWqkR9jBaOEEuQ8PbW TeHTPweqRz08Y+gHtd/8ko/E4XSADfkRP2p65gp/XGWwKe3WajGhhZQ+9bhYBo2znAqc J9vzqVp38t6tTah1CldWfMs2dsRfrtp1WOUSRksxsO8lZ2DaYW7EaTlfjzJ2ZELU8D6x 0j+t2yIPyMeuGjvZasJJ1P3CVKIRe8weMi/51RwHHICv8idprYVUHGliC70WEwPnGZEk Kw9A== X-Gm-Message-State: AOJu0Yzy63NrnEsU6AuVaENMgT9H3pRuNoH4iCl4siVbmDTgn+2xZg0c nHFsgMU/uoveI3LinZtraex+qKTuOc8635szuZWu7rVDRBPTo8/jYBjEggJwFIDn8M/cjr4d6ru gCQJFF78Zt64bKVr12tCg23RSTNuOSKEaulk= X-Gm-Gg: ASbGncv2tffRosvRgcgiTBcYy1rti5tnpd+EN/FRmtDdJ29WBJ0e7IrveYcnkiayB8F IjznD+y7mgfPHykxgwUucK4X7jIeDQiAN5In1lkiB4HpXu6ADR/KJVYNMDMOQ9FjLGMWvOTAV X-Google-Smtp-Source: AGHT+IGBUqsbKZAI0+Hr1owllyyeNzbGx4WDo5iP0CXGveshD1uIwhw2/U+Sa7x6DpnsxUK9YWh4YmROjOCwB6AcXWs= X-Received: by 2002:a05:6902:3408:b0:e5d:c1b4:8d95 with SMTP id 3f1490d57ef6-e5dc91f5443mr7987738276.36.1739818414822; Mon, 17 Feb 2025 10:53:34 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <24becc76-b67f-4805-b33b-cd4f9f6d0b30@scriptfusion.com> In-Reply-To: <24becc76-b67f-4805-b33b-cd4f9f6d0b30@scriptfusion.com> Date: Mon, 17 Feb 2025 20:53:24 +0200 X-Gm-Features: AWEUYZn62x95APpNCMJ1uoI97zlBAv3v0hq3vvgaVRvDsCy0XssZvR5Svu7e35o Message-ID: Subject: Re: [PHP-DEV] PHP True Async To: Bilge Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000096de20062e5b0a36" From: edmond.ht@gmail.com (Edmond Dantes) --00000000000096de20062e5b0a36 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I forgot to mention this. There is an important *limitation* in how this solution behaves in the context of PHP. Calls to PHP functions that normally block execution in the zero-Fiber do not change their behavior. This solution has both advantages and disadvantages. The advantage is that it does not break *backward compatibility* in any way. Calling sleep(10) at the beginning of --00000000000096de20062e5b0a36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I forgot to mention this. There is an = important limitation in how this solution behaves in the cont= ext of PHP.

Calls to PHP functions that normally block execution in t= he zero-Fiber do not change their behavior. This solution has both advantag= es and disadvantages. The advantage is that it does not break backward c= ompatibility in any way. Calling sleep(10) at the beginnin= g of <?php will cause the process to go into a wait state.<= /p>

True Async changes the behavior of functions only if they are = running inside a Fiber with an active Scheduler.

This is yet another = consequence of this architectural decision, and some people might not like = it. However, at this point, I don=E2=80=99t see a better solution that woul= d be optimally balanced between legacy support, explicit behavior, and impl= ementation simplicity.

Have a nice day!

Ed.

--00000000000096de20062e5b0a36--