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 pitrou
Recipients asvetlov, grahamd, ncoghlan, pitrou
Date 2012-08-24.12:45:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345812105.3368.5.camel@localhost.localdomain>
In-reply-to <1345811756.54.0.301559045079.issue15751@psf.upfronthosting.co.za>
Content
> New API:
> - if a thread state exists, and the interpreter doesn't match the
> requested one, fail with an error
> - otherwise, use the requested interpreter

That's not what I'm proposing. What I'm proposing is that the new API
uses a per-interpreter TLS key (so you can have several thread states
per OS thread).

So basically:

Ensure:
- look up global TLS key, which returns the thread state
- if no thread state (TLS lookup failed), create a new one for the main
interpreter and register it on the global TLS key

New API:
- look up the interpreter's TLS key, which returns the thread state
- if no thread state (TLS lookup failed), create a new one for the
interpreter and register it on the interpreter's TLS key

Graham is merely suggesting for simplification that "global TLS key" ==
"main interpreter's TLS key", so Ensure(...) ==
EnsureEx(main_interpreter, ...).
History
Date User Action Args
2012-08-24 12:45:06pitrousetrecipients: + pitrou, ncoghlan, grahamd, asvetlov
2012-08-24 12:45:06pitroulinkissue15751 messages
2012-08-24 12:45:05pitroucreate