python / python/cpython

Docs Are Not Clear on How to Share a Queue Between Interpreters

Open
#139,515 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.14 3.15 docs topic-subinterpreters
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

Users create cross-interpreter queues by calling concurrent.interpreters.create_queue(). @terryjreedy pointed out that the docs aren't clear about how to get a queue in one interpreter over to another interpreter. See https://github.com/python/cpython/issues/139383#issuecomment-3354723401.

The docs entry for concurrent.interpreters.create_queue() should call this case out specifically and include a short example code snippet. It would probably be smart to add something similar to the docs entry for Interpreter.prepare_main(); the original motivation for that method was to pass a queue to another interpreter.

Linked PRs
  • gh-149367

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation entries for concurrent.interpreters.create_queue() and Interpreter.prepare_main(), then review the linked discussion in issue 139383. Add a clear explanation and short example showing how a queue is passed between interpreters, with similar guidance for Interpreter.prepare_main(); done means both entries explicitly document this use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.