Answer prose round 1: 0 🔴, 2 🟡 (0 misread); reword the timer's docstrings, comments and help, rename the no-compaction test

This commit is contained in:
2026-11-19 04:44:37 +01:00
parent 708347382b
commit a2ea673822
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ def run_python(args: list[str], cwd: str, timeout: float) -> subprocess.Complete
def start_timer(delay: float, action: typing.Callable[[], None]) -> typing.Callable[[], None]:
"""Runs action on a thread of its own once delay seconds have passed, and returns what stops the timer: it cancels an action not yet started, and waits for one that has started to end."""
timer = threading.Timer(delay, action)
# A loop that exits while it waits doesn't wait for the action.
# A timer still running doesn't keep the process alive once the loop exits.
timer.daemon = True
timer.start()