Steve Dower <steve.do...@python.org> added the comment:

Changing every API to take the context parameter would bring us into alignment 
with the JavaScript VMs.

I'm working on a project that embeds a few of these, as well as Python, and our 
thread management is much worse than their context parameter. Though I'm of 
course very sympathetic to the compatibility argument (but then the shims would 
just load the context from TSS and pass it around, so they're not too bad).

Eric's breakdown of context scopes seems spot on, and it means that we only 
really need the thread state to be passed around. The few places that would be 
satisfied by runtime state now (GIL, GC) should become interpreter state, which 
is most easily found from a thread state anyway.

Runtime state should eventually probably become runtime configuration (those 
settings we need to create interpreters) and a minimum amount of state to track 
live interpreters. I see no reason to pass it around anywhere other than 
interpreter creation, and as a transitional step toward that goal it should be 
accessible through the active interpreter state.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to