Author vstinner
Recipients Dennis Sweeney, SD, eryksun, lunixbochs2, miss-islington, ned.deily, paul.moore, pitrou, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-06-14.07:14:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623654865.02.0.824685644595.issue41299@roundup.psfhosted.org>
In-reply-to
Content
I suggest to remove the (now <= 0) check.

        _PyTime_t now = _PyTime_GetPerfCounter();
        if (now <= 0) {
            Py_FatalError("_PyTime_GetPerfCounter() == 0");
        }

Please don't add such Py_FatalError() in the middle of a function. If this case happens, it means that Python immediately exits and creates a debug report (ex: coredump on Unix, popup on Windows asking to open a debugger), and worse: it exits the process immediately.

I'm not aware of anyone reporting that _PyTime_GetPerfCounter() returns 0. Do you fear that the clock is broken and *always* report 0? If yes, please add at check when Python starts. But why do you think that it could happen?
History
Date User Action Args
2021-06-14 07:14:25vstinnersetrecipients: + vstinner, paul.moore, pitrou, tim.golden, ned.deily, zach.ware, eryksun, steve.dower, miss-islington, Dennis Sweeney, SD, lunixbochs2
2021-06-14 07:14:25vstinnersetmessageid: <1623654865.02.0.824685644595.issue41299@roundup.psfhosted.org>
2021-06-14 07:14:25vstinnerlinkissue41299 messages
2021-06-14 07:14:24vstinnercreate