Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-134939: Add a Multiple Interpreters Howto Doc#136143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ericsnowcurrently wants to merge23 commits intopython:main
base:main
Choose a base branch
Loading
fromericsnowcurrently:multiple-interpreters-howto
Open
Changes from1 commit
Commits
Show all changes
23 commits
Select commitHold shift + click to select a range
96e1e78
Add the multiple interpreters howto doc.
ericsnowcurrentlyJul 16, 2024
e5e980e
Drop extraneous changes.
ericsnowcurrentlyJun 19, 2025
2fcaedd
Finish howto doc, minus recipes.
ericsnowcurrentlyJun 20, 2025
aea8278
Add a TODO list.
ericsnowcurrentlyJun 26, 2025
4bb1e2f
Drop the execcomponents ref.
ericsnowcurrentlyJun 30, 2025
d1ab402
Fix a ref.
ericsnowcurrentlyJun 30, 2025
1c2d40f
Drop the examples section for now.
ericsnowcurrentlyJun 30, 2025
ade2ce3
Fix typos.
ericsnowcurrentlyJul 1, 2025
40f50e7
Add a misc section to the tutorial.
ericsnowcurrentlyJul 1, 2025
0c3105b
Clarify about prepare_main().
ericsnowcurrentlyJul 1, 2025
6028349
Fix a pseudo-ref.
ericsnowcurrentlyJul 1, 2025
d7a7cf0
Fix the examples.
ericsnowcurrentlyJul 1, 2025
fb13944
Tweak one example.
ericsnowcurrentlyJul 1, 2025
72e46fb
Add a ref.
ericsnowcurrentlyJul 2, 2025
675246d
Clarify about Interpreter.exec().
ericsnowcurrentlyJul 3, 2025
22e3ee0
Clarify about calling different kinds of function.
ericsnowcurrentlyJul 3, 2025
f7661da
Clarify a note.
ericsnowcurrentlyJul 3, 2025
28f0218
Add a caveat about -c and the REPL.
ericsnowcurrentlyJul 3, 2025
1b79755
Add a pro tip.
ericsnowcurrentlyJul 3, 2025
b75c380
Add run-examples.py and fix some of the examples.
ericsnowcurrentlySep 23, 2025
35101a0
Do not try reformatting run-examples.py.
ericsnowcurrentlySep 24, 2025
ddae34c
Fix some of the examples.
ericsnowcurrentlySep 24, 2025
652abd3
Do not lint run-examples.py.
ericsnowcurrentlySep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Drop the examples section for now.
  • Loading branch information
@ericsnowcurrently
ericsnowcurrently committedJun 30, 2025
commit1c2d40f31708d07c3a88b45728235f8b80fa64f8

Some comments aren't visible on the classic Files Changed page.

18 changes: 2 additions & 16 deletionsDoc/howto/multiple-interpreters.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,15 +9,11 @@ multiple interpreters in a Python program. We will focus on doing
so in Python code, through the stdlib :mod:`concurrent.interpreters`
module.

This document has 3 parts: first a brief introduction, then a tutorial,
and then a set of recipes and practical examples.
This document has 2 parts: first a brief introduction and then a tutorial.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
This document has2 parts: first a brief introduction and then a tutorial.
This document hastwo parts: first a brief introduction and then a tutorial.


The tutorial covers the basics of using multiple interpreters
(:ref:`interp-tutorial-basics`), as well as how to communicate between
interpreters (:ref:`interp-tutorial-communicating`).
The examples section (:ref:`interp-recipes`) is focused on providing
effective solutions for real concurrency use cases. This includes
comparisons with Python's various existing concurrency models.

.. currentmodule:: concurrent.interpreters

Expand All@@ -38,6 +34,7 @@ comparisons with Python's various existing concurrency models.
.. TODO:

* tutorial: explain how to use interpreters C-API?
* add a top-level recipes/examples section
* recipes: add some!
* recipes: add short examples of how to solve specific small problems
* recipes: add a section specifically for workflow-oriented examples
Expand DownExpand Up@@ -1099,14 +1096,3 @@ Here's a more elaborate example::
...

Using a :mod:`logger <logging>` can also help.


.. _interp-recipes:

Recipes (Practical Examples)
============================

Example: ...
------------

...
Loading

[8]ページ先頭

©2009-2025 Movatter.jp