New submission from Antoine Pitrou <pit...@free.fr>:

It should be relatively easy to devise a new PyGILState API with support for 
multiple interpreters. We just need two new functions (similar to the two 
existing ones) taking a PyInterpreterState* parameter; a TLS key can be added 
to the PyInterpreterState structure (instead of the current global TLS key).

It will be up to the caller to know which interpreter they want to hook into 
when calling these functions (which is application-dependent and is normally 
well-defined, e.g. when calling a Python callback, you should call it with the 
interpreter which was in use when registering the callback (i.e. 
``PyThreadState_Get()->interp``)).

----------
components: Interpreter Core
messages: 126333
nosy: amaury.forgeotdarc, grahamd, loewis, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Make the PyGILState API compatible with multiple interpreters
type: feature request
versions: Python 3.3

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

Reply via email to