Message169010
> 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, ...). |
|
Date |
User |
Action |
Args |
2012-08-24 12:45:06 | pitrou | set | recipients:
+ pitrou, ncoghlan, grahamd, asvetlov |
2012-08-24 12:45:06 | pitrou | link | issue15751 messages |
2012-08-24 12:45:05 | pitrou | create | |
|