Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126576 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 E61711A00BC for ; Wed, 5 Mar 2025 10:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741172143; bh=yIALwhsW+P+z6ElFUMZ6y6bkIDCJmKxLt6fPT1k07zU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HBatWPBr125IMiQD4qrQTvKlDMBYbmS9YOLk4nkl1tOoFr1T/x41Xs5WBJ1vIGaFw 90Hlueu2iR0RQvBWt+KfBCh4C7SBab8HB3UAD+YJGkfW+UpjkWfn1Sq8YNSAx0LGbT YgvgsqNMOUPDIp0puAAoUqiQWXuOPa88wvkF6wAQlrmH7jWh50oTVHhTjvGhvPULNm LxNgwVVP3iU5+HZJlxrUOvTZ6w5A9AfFORZO7d+jjasqXrERikmUTDT8InXc1rQ5Hb 8utl2wv7VKHoul9SlaqKwdM08AED/75GkU7ATEHLKB7YQ40rT/DyYPpdfZM/Y1iA98 +PMdRow/l402A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 04EC8180083 for ; Wed, 5 Mar 2025 10:55:42 +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.2 required=5.0 tests=BAYES_50,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (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 ; Wed, 5 Mar 2025 10:55:41 +0000 (UTC) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3f682bb0d77so348673b6e.1 for ; Wed, 05 Mar 2025 02:58:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741172296; x=1741777096; 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=yIALwhsW+P+z6ElFUMZ6y6bkIDCJmKxLt6fPT1k07zU=; b=G/ctWsnBDj2vIdje5kGSHVMpu/ozsdtv1NiiGXw6a20yX4U6yf6oQdBNtcGo2bG/lW oLypv3SlQ0Bzvi9qeAdCmvYeInY/uqBuu3OR/xq/ojv0XqBLqMi0ciR0ndh9ieonzl1V WspLkUOpo+PhTHcldDW7Tddmv2QyXZ+uKhl2/08UroHzu0G78bkuibey4fB4xUaD48dy xsJ9doKuCCR9HNbh7CNwsE2U/j1RuwF/rNXyJtE8IYpRoIyUMJzXGjTyI8Uf98p3fxAH BmhOcbMSw3w81PIfgp0lTEY8UEevJstKzlI+Z4tyi9NNOepEQmu0Bdk50s+4C9FfmOE1 QLng== X-Gm-Message-State: AOJu0YwVTxkE1/CwmdUU+GFSoJgJOxnaWrYKIy7W5HiHxvYOTKPIPJx7 eKHQnGtV9FOfbKH3vaQEl+N7lSjak0Cyj8wG7I69667oSRRlPANLQBp6YPqXYfCTZtVcgh6k4N1 Mn5rH2r4IGLXRbIynWz96awiOmuw= X-Gm-Gg: ASbGncugjXGpe7qQ4E+QXBEdTxRYRztJijMStBgGY1qcu7hLa2n+LF0A8Mye6wKZ/lc qmmHYnffm8pInP9DxfCC4SpH/Nk6ogGBVn7tD8bZqwQm1DOhOThMVG40Pyq6hVlslzFzKPhy1f0 t5G1BwftGiQ6ccPfVo4nB1LzfLCQ== X-Google-Smtp-Source: AGHT+IGz1tyFfyJw/LqEJOhQBgE1MCN4FpZ/y+7ZWetWMj1zuFp+WPRGVh3ey6oL9vskNHeeljNM6Arllh3whtJ78hU= X-Received: by 2002:a05:6870:2107:b0:29e:1962:7a23 with SMTP id 586e51a60fabf-2c21b2f2014mr1275680fac.4.1741172296343; Wed, 05 Mar 2025 02:58:16 -0800 (PST) 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: Wed, 5 Mar 2025 11:58:05 +0100 X-Gm-Features: AQ5f1JpYXDwpIMdrTDd3kO2nW2lPBHjBRInZ5DM1XfEpK6GnI4hfmtiEKGsvaz4 Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC To: Edmond Dantes Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000376877062f9644c6" From: bukka@php.net (Jakub Zelenka) --000000000000376877062f9644c6 Content-Type: text/plain; charset="UTF-8" Hi, > https://wiki.php.net/rfc/true_async > > I believe this version is not perfect and requires analysis. And I > strongly believe that things like this shouldn't be developed in isolation. > So, if you think any important (or even minor) aspects have been > overlooked, please bring them to attention. > I thought about this quite a bit and I think we should first try to clarify the primary design that we want to go for. What I mean is whether we would like to ever support a true concurrency (threads) in it. If we think it would be worth it (even thought it wouldn't be initially supported), then we should take it into the account from the beginning and add restrictions to prevent race conditions. It means it should probably disallow global (e.g. global $var;) variables or at least make them context specific as well as disallowing object sharing. I think PHP users should not deal with synchronization primitives. Basically what I want to say is that multithreading should not be just something mentioned in the future scope but the whole design should be done in a way that will make sure everything will work fine for users. Ideally also having some simplified implementation that will verify it. I also agree that the scope is currently too big. It should be reduced to the absolute minimum and just show what's possible. It's great to have a proof of concept for that but the initial proposal should be mainly about the design and introducing the core components. Regards, Jakub --000000000000376877062f9644c6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

= https://w= iki.php.net/rfc/true_async

I believe this version is not perfect = and requires analysis. And I strongly believe that things like this shouldn= 't be developed in isolation. So, if you think any important (or even m= inor) aspects have been overlooked, please bring them to attention.


I thought about this quite a bit and I t= hink we should first try to clarify the primary design that we want to go f= or. What I mean is whether we would like to ever support a true concurrency= (threads) in it. If we think it would be worth it (even thought it wouldn&= #39;t be initially supported), then we should take it into the account from= the beginning and add restrictions to prevent race conditions. It means it= should probably disallow global (e.g. global $var;) variables or at least = make them context specific as well as disallowing object sharing. I think P= HP users should not deal with synchronization primitives. Basically what I = want to say is that multithreading should not be just something mentioned i= n the future scope but the whole design should be done in a way that will m= ake sure everything will work fine for users. Ideally also having some simp= lified implementation that will verify it.

I also = agree that the scope is currently too big. It should be reduced to the abso= lute minimum and just show what's possible. It's great to have a pr= oof of concept for that but the initial proposal should be mainly about the= design and introducing the core components.

Regar= ds,

Jakub
--000000000000376877062f9644c6--