GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Thread.join(timeout) can block forever: ThreadHandle_join reads the clock twice through Py_MAX (3.13, 3.14) · Issue #161712 · python/cpython Open Labels 3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug report
// _PyDeadline_Get will return a negative value if the deadline has // been exceeded. timeout_ns = Py_MAX(_PyDeadline_Get(deadline), 0); (3.13 branch, line 517; 3.14 branch, line 544; also in v3.13.16 and v3.14.0.)
Why it needs a wait that ends early. The window is the interval between the two clock reads, after a wait that ended a little before the deadline. On Windows, wait timeouts are counted in timer ticks (15.6 ms by default) while the deadline uses the high-resolution clock, so a wait often ends a fraction of a tick early and sends the loop around again. A program that joins in a loop with a short timeout gives it many chances. Observed. A pyqtgraph window's GUI thread (Windows 11, Python 3.13.16 from conda-forge) polled I could not provoke it in a synthetic test (22 million Fix. timeout_ns = _PyDeadline_Get(deadline); timeout_ns = Py_MAX(timeout_ns, 0); That commit was a cleanup of several files and was not marked as a bug fix, so it was not backported. Could the Your environment
Linked PRsActivity
MetadataMetadataAssigneesLabels3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |