Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111655 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48024 invoked from network); 20 Aug 2020 14:19:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Aug 2020 14:19:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D247C1804AA for ; Thu, 20 Aug 2020 06:21:30 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) (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 ; Thu, 20 Aug 2020 06:21:30 -0700 (PDT) Received: by mail-il1-f195.google.com with SMTP id e11so1571462ils.10 for ; Thu, 20 Aug 2020 06:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N8kv5QlBtaTMxRhbGZk3YHkmGGp4h6a0O835bOaChl4=; b=hPkAbgSrjIaPY0h6ozqEGl5OkwU/ZKJTelswJLXtu1NiKaEKrrQWLU+3caySaokfYZ nlle1MytfuOQnxmeu36uJd3Kh5BzwaM5bS3dvLhYStQfv07vDPmQ/V1/PurTjaLGS9VR /6Ln4A5xDExTF6k3nFOBD6Fgh+9t3wsW1HR1EwlCJb4U0y3nbmBZssni+VIkWizITJT8 3Lcp0CBpHFoLdoQItLgZ9lgNbLMt2NyDov/Q+Bg9Pt2XLgEOYXJJFxcUQQgmoUZp7SRu Wm1bKthj+gvYI9CaiysLeMMiOTnwSwqQpqSFbH99YVKUWHPQhlpKlaQm27bEDCx4M5em eapw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N8kv5QlBtaTMxRhbGZk3YHkmGGp4h6a0O835bOaChl4=; b=AsIgDAdRc7OiNgvOzskQDAqNDpPJeL+TMRNBroj6f2uR4Mtb2HvaOPACr6bL5dg8Ex OmGT7T6X5XLUma63BhiQxga3Etqq19J9qzx9F7Wq/IHbXZk7G/4qS+TxzsOKrEkg7sn2 npqOpuAxiHXeFQnuzFCAxcE/skHOGAigHtziFByXKNbyxryJ0uLFxXUXp035BeOuxpLB /lwl/IVdySDQY4FDUPLUXTJ9UqtlzxjVtTBu9vQXzUlwug9dtInqIxtcV8n5SEZiN6r7 LHfIyxrPWu9L2thzjBgaLePGBT+Gq6e2SVPlATzx2SE+Bhw43CclgecbJQln12ZRE5WW gIEg== X-Gm-Message-State: AOAM533Y/JwYHxiZZxZYqSRj9Rh7Cuq7x6eMbf/kjKJ7XK9g5QzrupEU PMrNhaeqvLY6jHDevItmgS4TIRvk613leHyAjFo= X-Google-Smtp-Source: ABdhPJyl02rjlwgqw0iC068H+oFgOAsvGgHATgj6TEUcsYAiX5uEw9nzE6H+KZM2WE0IAUHQyJ7Hsn1NH0XUT70b2rA= X-Received: by 2002:a92:bb19:: with SMTP id w25mr2532207ili.149.1597929687386; Thu, 20 Aug 2020 06:21:27 -0700 (PDT) MIME-Version: 1.0 References: <6cfb77d4d511b5c591e7d7b5cc80199955123b2cd4276a5bca2327e4b02942db@mahalux.com> <4a6d97c1-28e8-c6cb-e985-d32c5d056ec0@telia.com> <6580abc6e6d8d73f1722d3070ec5214c7d0ba13759b97c60eacf57cfbfae50ab@mahalux.com> In-Reply-To: <6580abc6e6d8d73f1722d3070ec5214c7d0ba13759b97c60eacf57cfbfae50ab@mahalux.com> Date: Thu, 20 Aug 2020 15:21:11 +0200 Message-ID: To: =?UTF-8?B?TWljaGFlbCBWb8WZw63FoWVrIC0gxIxWVVQgRkVM?= Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000006491e305ad4eff86" Subject: Re: [PHP-DEV] Allow sleep() to accept non-integer values From: carusogabriel34@gmail.com (Gabriel Caruso) --0000000000006491e305ad4eff86 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 20 Aug 2020 at 14:55, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVUT FE= L < vorismi3@fel.cvut.cz> wrote: > > Again, I personally don't understand why this could bypass the RFC > process, as multiple people have already, me included, voiced their > disagreement with this change. > > This was proposed by Nikita Popov in his comment > Nikita is just one of the members. If other members want an RFC, we need it= . Also, the PR has a couple of :-1: votes as well, which indicates that an RFC is necessary. > > > Secondly this change introduces another inconsistency, why can sleep > accept a float but not usleep? > > Nanosleep and microsleep functions are basically 1:1 of the underlaying > implementation. The updated sleep() is however now never worse than the > best sleep function available, thus we can use it also for > time_nanosleep and usleep php function and accept float. I will > implement it. > > > If there is indeed a need for being able to specify a sleep in > milliseconds I'd prefer the introduction of a msleep function then this > change. > > The issue I solve is sleep function that accepts seconds should accept > floating point values as time is continous value. > > With kind regards / Mit freundlichen Gr=C3=BC=C3=9Fen / S p=C5=99=C3=A1te= lsk=C3=BDm pozdravem, > > Michael Vo=C5=99=C3=AD=C5=A1ek > > On 20 Aug 2020 14:25, G. P. B. wrote: > > > Apologies for the double email, my client did something funcky. > > > > On Thu, 20 Aug 2020 at 14:22, G. P. B. > wrote: > > > > On Thu, 20 Aug 2020 at 14:15, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVU= T FEL < > vorismi3@fel.cvut.cz> wrote: Hi everyone, > > > > thank you for your comments, based on them, I fixed these: > > > > - usleep is now used as a fallback as well, if interrupted, remaining > > time is measured using microtime, so return value is always available > > > > - for BC, if not interrupted, return value remains to be 0 (integer > > zero) > > > > Now, the sleep() function should be really universal, cross platform an= d > > I would say also the prefered way to sleep. > > > > The implementaion is here https://github.com/php/php-src/pull/5961/file= s > > > > Please comment on Github directly if you have any feedback left. > > > >> I thinkit's worth considering if this also should be fixed in 8.0 or > even earlier ;-)So good to hear the RM view on this. > > > > Sara, are you ok to include this in PHP 8.0 and do you require a RFC fo= r > > it? > > > > With kind regards / Mit freundlichen Gr=C3=BC=C3=9Fen / S p=C5=99=C3=A1= telsk=C3=BDm pozdravem, > > > > Michael Vo=C5=99=C3=AD=C5=A1ek > > Again, I personally don't understand why this could bypass the RFC > process, > as multiple people have already, me included, voiced their disagreement > with this change. > > Secondly this change introduces another inconsistency, why can sleep > accept a float but not usleep? > > If there is indeed a need for being able to specify a sleep in > milliseconds I'd prefer the introduction of a > msleep function then this change. > > Best regards > > George P. Banyard --0000000000006491e305ad4eff86--