Callbacks failing in Python (was Re: Use of Py_BEGIN_ALLOW_THREADS?)

Aahz Maruch aahz at panix.com
Fri May 18 00:31:32 CEST 2001


In article <3B043227.8879EC24 at rfa.org>, Bill Eldridge  <bill at rfa.org> wrote:
>Aahz:
>>
>> 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.

Okay, the threads were a red herring.  I'm therefore changing the
Subject in the hopes that someone who actually knows about extensions
and Python will pay attention -- it's not something I know anything
about.
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"It's such a fine line between stupid and clever."  --David St. Hubbins



More information about the Python-list mailing list