]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-130421: Fix data race on timebase initialization (gh-130592)
authorSam Gross <colesbury@gmail.com>
Thu, 27 Feb 2025 13:27:54 +0000 (08:27 -0500)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 13:27:54 +0000 (13:27 +0000)
commitd027787c8d89f59a9f0b1d7cc6972f5e16ffc740
tree1128b31a519ee0a1499fd6085881d5d0a107befd
parent45a24f54af4a65c14cc15fc13d3258726e2fe73b
gh-130421: Fix data race on timebase initialization (gh-130592)

Windows and macOS require precomputing a "timebase" in order to convert
OS timestamps into nanoseconds. Retrieve and compute this value during
runtime initialization to avoid data races when accessing the time.
Include/internal/pycore_runtime.h
Include/internal/pycore_time.h
Python/pystate.c
Python/pytime.c