periodic PendingCall in embedding

pythonnewsgrp at my-deja.com pythonnewsgrp at my-deja.com
Wed Dec 8 20:25:21 EST 1999


Hi

I'm building a python extension module and need to
schedule the periodic calling of a C routine in
the extension code (it's a sort of event handler,
but that's not really important), and I'm looking
at Py_AddPendingCall, which looks very suitable as
it makes sure the C routine is called when the
interpreter is between instructions.

However, when Py_MakePendingCalls schedules a
call, if that function wants to schedule itself
for execution again _after_ the next python
instruction, it looks like it can't, as calling
Py_AddPendingCall will cause itself to be
immediately reexecuted upon returning? Am I wrong
or is there a way to get round this?

Any help would be most appreciated,
thanks

Christopher


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list