This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients eric.snow, nanjekyejoannah, ncoghlan
Date 2019-04-05.17:27:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554485231.7.0.796110883683.issue36487@roundup.psfhosted.org>
In-reply-to
Content
I should have added something like this earlier, but here are key points to consider covering:

* "main" interpreter is the original, created when the runtime initializes
* historically almost always the only Python interpreter in a process
    * this is changing (more projects using subinterpreters, PEP 554)
    * in the "python" executable, subinterpreters available via extension modules (but uncommon)
* it has extra responsiblities:
    * signal handling, in main thread
    * "pending calls", in main thread
        * not necessarily something to publicize :)
    * running in the "main" thread
        * can be taken over by a sub-interpreter, but not likely
    * execution *during* runtime initialization
    * usually (always?) the active interpreter during runtime finalization
    * others?
* no strong link between interpreters (e.g. main <--> sub <--> sub)
    * no record of what interpreter was active (if any) when a subinterpreter was created
    * no "parent" interpreter
    * thread states may share thread ID
* a bunch of stuff in the C-API and in the runtime still assumes that the main interpreter is running in the current OS thread
* other stuff?


Not all of that necessarily belongs there in the docs, but a lot of it does. :)
History
Date User Action Args
2019-04-05 17:27:11eric.snowsetrecipients: + eric.snow, ncoghlan, nanjekyejoannah
2019-04-05 17:27:11eric.snowsetmessageid: <1554485231.7.0.796110883683.issue36487@roundup.psfhosted.org>
2019-04-05 17:27:11eric.snowlinkissue36487 messages
2019-04-05 17:27:11eric.snowcreate