calldll and threads...

Steve sjh at shic.co.uk
Wed Mar 27 05:44:26 EST 2002


Mark Hammond <mhammond at skippinet.com.au> wrote in message 
> This is a common problem, not just with calldll.  Although you released 
> the lock OK, you will probably find that you did not re-acquire the lock 
> as calldll made callbacks into your code.  What was the callstack when 
> you crashed?

I won't bother you with the call stack (which was most uninteresting -
depth 2 in the pre-compiled python.exe when it had an address
exception)...  I hadn't realised that the C-API calls to
PyArg_ParseTuple() or Py_BuildValue() constituted call-backs into
Python in the context of the global lock. (I think it would be an
improvement if the manual made this point explicitly.)

Anyhow... my trivially modified calldll module is now happily allowing
me to make blocking calls in spawned threads without blocking all my
python threads. All's cheerful this bright spring morning - thanks...

Steve



More information about the Python-list mailing list