X Tutup
Skip to content

gh-142041: Improve concurrent.interpreters documentation#145657

Open
mvanhorn wants to merge 2 commits intopython:mainfrom
mvanhorn:osc/142041-improve-interpreters-docs
Open

gh-142041: Improve concurrent.interpreters documentation#145657
mvanhorn wants to merge 2 commits intopython:mainfrom
mvanhorn:osc/142041-improve-interpreters-docs

Conversation

@mvanhorn
Copy link
Contributor

@mvanhorn mvanhorn commented Mar 9, 2026

Fixes #142041.

Improves the concurrent.interpreters documentation with:

  • Queue class: Added complete method documentation (put, get, empty, full, qsize, put_nowait, get_nowait, maxsize) with parameter descriptions including the unbounditems behavior
  • prepare_main: Expanded description explaining its purpose as the primary way to pass data to subinterpreters, with a usage example
  • exec: Fixed incorrect signature (removed non-existent dedent parameter), added description of behavior, return value, error handling, and blocking semantics
  • call and call_in_thread: Expanded descriptions covering supported callables, pickle fallback, error handling, and thread behavior
  • create_queue: Documented maxsize and unbounditems parameters
  • is_shareable: Added missing function documentation
  • Basic usage section: Rewrote with clearer, separated examples covering exec/call, prepare_main, queue communication, and parallel execution patterns
  • Added tip pointing users to InterpreterPoolExecutor for simpler use cases

This contribution was developed with AI assistance (Claude Code).


📚 Documentation preview 📚: https://cpython-previews--145657.org.readthedocs.build/

- 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>
@python-cla-bot
Copy link

python-cla-bot bot commented Mar 9, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app bot added the docs Documentation in the Doc dir label Mar 9, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Mar 9, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Improve concurrent.interpreters documentation

1 participant

X Tutup