Use of Py_BEGIN_ALLOW_THREADS?

Bill Eldridge bill at rfa.org
Thu May 17 16:18:47 EDT 2001


> >I'm not specifically sure why I need the threads at all,
> >as some have indicated to me.  Again, the thing that's
> >failing follows:
> 
> Well, I don't know why you're using threads, either, but you're
> definitely doing something screwy if this works unthreaded and fails
> threaded.

No, it works called from C, and doesn't work called
from Python.  The only reason for me trying threads
was thinking that Python might be treating the callback
function as a separate thread.  But the C code never
needed threads as called from a C main function, and
I don't see a good reason it should need it as invoked
from Python.  But then it just doesn't work from Python,
threads or no threads, though I can easily do a
"Hello World" called from a Python main.  As soon as
I throw in a callback (callling C functions, not
Python), it fails.
--
Bill Eldridge
Radio Free Asia
bill at rfa.org



More information about the Python-list mailing list