problem implementing a threaded module

Stephane Conversy conversy at
Thu Apr 20 19:10:17 CEST 2000

Hi. I'm trying to implement a C module that launches a pthread
and calla a python call-back.

I think it's not a big deal for those who know how to do it, but
my implementation does not work (seg fault).

I didn't really understand what to do exaclty:
should I create an interpreter state for each thread, using
PyInterpreterState_New ?
should I create a thread state for each thread with  PyThreadState_New and
it with the current thread state ?

I can't figure out what to do. Is there any example that just creates a
and calls a python func ?

Thank you.

Stéphane Conversy
mailto:conversy at

More information about the Python-list mailing list