Repository navigation
v0.39.1 — async access-log emission actually starts
--access-log-async / VGI_RPC_ACCESS_LOG_ASYNC raised RuntimeError: cannot set daemon status of active thread at startup. The feature could never have worked in any release that shipped it.
The branch called listener.start() and then set listener._thread.daemon = True. QueueListener.start() already constructs its thread with daemon=True, and Thread.daemon raises once the thread is running — so the line that only restated an existing guarantee took down every caller of the branch it guarded, before a single record was written.
Nothing caught it because no test configured the async path: the plain, size-rotating and time-rotating handler tests beside it all go down the else, one boolean away from code that always raised.
Fix: delete the two lines. atexit.register(listener.stop) stays — it is the part that does something, draining what is still queued so a clean shutdown does not lose the tail of the log.
Tests: three new cases pin that configuring the async path returns rather than raising; that the listener thread is a daemon, asserted rather than assigned; and that a record handed to the queue reaches the file. The last matters because the crash left no listener at all, so attaching the queue handler proves nothing on its own. Verified by sabotage — restoring the two lines fails exactly those three.
Patch rather than minor: no public API changes, and the flag's documented behaviour is unchanged. It simply happens now. Anyone who tried the async access log and backed it out assuming their configuration was wrong should retry.