[Python-Dev] Threading and callbacks - missing documentation

Jack Jansen Jack.Jansen@oratrix.com
Thu, 11 Apr 2002 23:14:54 +0200

unless I'm looking in completely the wrong place (I looked in 
"extending and Embedding" and in "Python/C API") there is 
absolutely no information in the docs on the interaction between 
callbacks and the GIL. There is preciously little information on 
callbacks and threading, and it isn't very helpful at that (i.e. 
there doesn't seem to be a recipy on how to obtain the GIL in a 
callback routine that is about to call Python code, or how to 
test whether the current thread holds the GIL already).

As I'm currently very interested in this for two separate 
reasons (one work-related, and another one is that I want to 
make the Mac toolbox modules release the GIL when appropriate) I 
could write something up, but only if (a) it isn't documented 
somewhere already and (b) someone can tell me how it actually 
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -