Extension modules, Threading, and the GIL

"Martin v. Löwis" martin at v.loewis.de
Tue Dec 31 12:24:33 EST 2002


Bengt Richter wrote:
> Perhaps this discussion needs to distinguish clearly between OS
> threads and Python threads? 

David is right that it does not matter for this issue how a thread is 
created: Python can deal with threads created through C API just as fine 
as with "Python threads"; Python threads are created through the very 
same C API.

> I read the stuff at the URL above (not saying I totally digested it)
> and got the impression that Dave is saying a "callback" may be called
> **without** the running and calling thread having acquired the GIL.

I'm getting the feeling that the interpreter *lock* is irrelevant for 
the problem at hand. The observed behaviour was not a deadlock, but that 
Python suddenly had a NULL thread state. This is not supposed to happen, 
and it is unclear to me why it happened.

Regards,
Martin




More information about the Python-list mailing list