Repository navigation
Conversation
docs/library.md warned that the reactor's worker threads are non-daemon, so an application that skips api.shutdown() never exits. That stopped being true in 1.4.0: afbc4a5 (#379) dispatches connect setup through reactor.callFromThread, so the thread pool is started from the daemon reactor thread and its workers inherit daemon status. The reporter's script from #255 exits rc=0 on main and hangs only with that one line reverted. The warning becomes a note: shutdown() is still the clean teardown, and the reason the context manager doesn't call it (a reactor cannot be restarted) stays. The VM example called client.connect(), which does not exist, and ended without api.shutdown(). The tearDownModule comment in test_api_lifecycle.py repeated the non-daemon claim; it now states the constraint that actually makes the call once-per-process. Smaller option: delete the warning outright. Rejected because readers on <1.4.0 still hit the hang and the shutdown()/with-block relationship is not obvious from the API. Refs #255, #273 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/library.mdsaid skippingapi.shutdown()hangs the process at exit. Not true since 1.4.0 (#379): the thread pool starts from the daemon reactor thread, so its workers are daemons. The warning becomes a note keepingshutdown()as the clean teardown. Also fixes the VM example'sclient.connect→api.connectand addsapi.shutdown(), and corrects the same claim in atest_api_lifecycle.pycomment.Tested outside CI: the #255 reporter's script exits rc=0 on main and hangs only with #379's change reverted.
Refs #255, #273
🤖 Generated with Claude Code