gh-142041: Improve concurrent.interpreters documentation#145657
Open
mvanhorn wants to merge 2 commits intopython:mainfrom
Open
gh-142041: Improve concurrent.interpreters documentation#145657mvanhorn wants to merge 2 commits intopython:mainfrom
mvanhorn wants to merge 2 commits intopython:mainfrom
Conversation
- Add complete Queue method documentation (put, get, empty, full, qsize, maxsize, put_nowait, get_nowait) with parameter descriptions - Expand prepare_main docs explaining its purpose with an example - Fix exec() signature (remove incorrect dedent parameter) - Add detailed exec() and call() descriptions with error handling info - Expand call_in_thread docs explaining thread behavior - Document create_queue parameters (maxsize, unbounditems) - Add is_shareable() function documentation - Rewrite Basic usage section with clearer examples for exec, call, prepare_main, queues, and parallel execution patterns - Add tip pointing to InterpreterPoolExecutor for simpler use cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
UNBOUND, UNBOUND_ERROR, UNBOUND_REMOVE, and ItemInterpreterDestroyed are not in the module's public __all__, so use literal backticks instead of :data: and :exc: roles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Fixes #142041.
Improves the
concurrent.interpretersdocumentation with:put,get,empty,full,qsize,put_nowait,get_nowait,maxsize) with parameter descriptions including theunbounditemsbehaviorprepare_main: Expanded description explaining its purpose as the primary way to pass data to subinterpreters, with a usage exampleexec: Fixed incorrect signature (removed non-existentdedentparameter), added description of behavior, return value, error handling, and blocking semanticscallandcall_in_thread: Expanded descriptions covering supported callables, pickle fallback, error handling, and thread behaviorcreate_queue: Documentedmaxsizeandunbounditemsparametersis_shareable: Added missing function documentationexec/call,prepare_main, queue communication, and parallel execution patternsInterpreterPoolExecutorfor simpler use casesThis contribution was developed with AI assistance (Claude Code).
📚 Documentation preview 📚: https://cpython-previews--145657.org.readthedocs.build/