Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113720 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2624 invoked from network); 23 Mar 2021 14:49:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Mar 2021 14:49:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9565F180539 for ; Tue, 23 Mar 2021 07:44:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 23 Mar 2021 07:44:37 -0700 (PDT) Received: by mail-ed1-f43.google.com with SMTP id x21so23745057eds.4 for ; Tue, 23 Mar 2021 07:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6sGMSQvtO3RlxyLVyncC4y88V1jT9OIh1l+sOHyP504=; b=c63OjwpfVcUUehnroeplbmB35oxYReBeLv9yzh05go7UZ6KuQFBb4hR+RUp/j5Cuvo hwgRbd2gYz5ys9QfQR2DHgOeoVtMTokKk1SuGssw9836WlYaI1lhdaG2MpxsiTxjB99u Xcy3CRqeqi+5oqLeo1FHeiBmt5FbcB9DbzchY5pmJiLJ+upCt0YbuJkztO227E6kYTEd PeZP8DT3gtS6BrWbkfr2isltxLoykEmEbxkk88nXQrbiso3UgLgFlv6AP8L/t+YftCl2 ifAdtXfz97BTx1E2+UHkC5sT+VMXadRQVn2jaq8cjWj4kf3BS1L6eRit2NYJ9VG1V6HN 6VGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6sGMSQvtO3RlxyLVyncC4y88V1jT9OIh1l+sOHyP504=; b=Y4nWjh+YgxhdzV10oqVz/zfqGw1n5W+Z/9iMZmkzCMBnmA02b39t22ZbONmJfDc/eq z8jYb2sQnQDXbuLSKwduomy8IMo+xjDnz1H8Vt+FwMNxGCjM0e7jZ0iFqqwpl9oYMnJJ Mi5joqeB7xbP1RON6wpljwsL2+CN9H4wtbFpWU/7Koyk0Zw4hoUfebovFJ8QnMCmusdn Mt9iyerTc1eOVi7RQZSPvoSAzxtSHOks3q5fyfeVfRUe47Xv8h6GENGpQhNbJJ/VuUUa 47hI5nQ+odoTaE1Aq/n68s8UVSlYYDpQbJMsqIHU1EZ8hv9sLInlk/DSDuCWS8lDhZjZ 2U5A== X-Gm-Message-State: AOAM533HaQD3GlKVN5gZB5k4wQbthEmJLioNYmdiom/eywRabQ/ukC/j 30Mbm8nkWhBhhdJZGt8iSL3bBswBvzUu3uKz+5THahzEphk= X-Google-Smtp-Source: ABdhPJzpIAaHZCjuriOoC1wdszJlsJsc6CwtFSuRvxpHN+r9rrCTGjg46qRXlIfkSdctgNIAs58rd6Xij3hsjxbEwtA= X-Received: by 2002:a05:6402:1cc1:: with SMTP id ds1mr4856181edb.135.1616510675889; Tue, 23 Mar 2021 07:44:35 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 23 Mar 2021 23:44:25 +0900 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000009cb3c405be3538a1" Subject: [RFC] Object-scope RNG again From: zeriyoshi@gmail.com (Go Kudo) --0000000000009cb3c405be3538a1 Content-Type: text/plain; charset="UTF-8" Hi internals. The Fiber vote appears to have passed. Congratulations! Now, while Fiber is a very nice feature, it has increased the severity of MT's global state problems. I have prepared an example using amphp. It is difficult to predict the results of the following run, and there appears to be no guarantee that consistency will be maintained. ```php task(1)); defer(fn() => task(2)); defer(fn() => task(3)); defer(fn() => task(4)); delay(1000); $running = false; /* Result: 1 : 411284887 4 : 1068724585 2 : 1335968403 3 : 1756294682 1 : 940013158 3 : 1314500282 4 : 1686544716 2 : 1656482812 1 : 1674985287 2 : 1848274264 3 : 585388171 4 : 323490420 4 : 593702477 3 : 426315791 2 : 1722007381 1 : 1750549071 */ ``` I have added a note to the RFC wiki about this issue. Also, the namespace voting option has been removed, as Nikita has already provided a suitable RFC. https://wiki.php.net/rfc/object_scope_prng Perhaps now is the time to discuss this proposal. I would like to include this implementation in PHP 8.1's Fiber. If there is no further discussion, I will move on to the voting phase. Regards, Go Kudo --0000000000009cb3c405be3538a1--