Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-135944: Add a "Runtime Components" Section to the Execution Model Docs#135945
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
base:main
Are you sure you want to change the base?
gh-135944: Add a "Runtime Components" Section to the Execution Model Docs#135945
Conversation
@@ -398,6 +398,75 @@ See also the description of the :keyword:`try` statement in section :ref:`try` | |||
and:keyword:`raise` statement in section:ref:`raise`. | |||
.. _execcomponents: | |||
Runtime Components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think it would be a good idea to mention that this is CPython specific. Other implementations are allowed to have different runtime models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is meant to be implementation agnostic
Oh, oops, didn't see this. Some parts are CPython specific here, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm trying to avoid any CPython-specific notions here. Do you have an example of another runtime model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No, I'm not familiar with how any other implementations work, this is coming solely off a bit of speculation on my part. My concern is that a thread is inherently CPython-specific, because some Python implementations exist in areas that don't have access to OS threads, such as Brython for JS, and probably MicroPython/CircuitPython for some microcontrollers.
I do think that this is a great section to have for subinterpreters, I just think it'd be better to keep some parts of it CPython specific. Does that make sense?
While a program always starts with exactly one of each of those, it may | ||
grow to include multiple of each. Hosts and processes are isolated and | ||
independent from one another. However, threads are not. Each thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There should probably be some mention of the GIL here.
Uh oh!
There was an error while loading.Please reload this page.
The section provides a brief overview of the Python runtime's execution environment.
This is meant to be implementation agnostic, If that doesn't hold true then we should take a different approach.
📚 Documentation preview 📚:https://cpython-previews--135945.org.readthedocs.build/