Using SaveThread and RestoreThread with callbacks

hg hansgeunsmeyer at earthlink.net
Mon Oct 14 10:30:57 EDT 2002


adam at cardaccess.com.au (Adam Rutkowski) wrote in message news:<b55100a.0210131638.63ae63eb at posting.google.com>...

> The application is multi-threaded, and the C code does block, so I
> have to use this to make it all work properly. The thing is, I didn't
> write the code, I'm just trying to fix it, so I wasn't entirely sure
> if the guy who wrote it was using the save and restore stuff
> correctly. I'll try using the macros instead, and see if that helps.
> Note that bug is that the app crashes occasionally with a fatal python
> error, and it looks like this is being caused by a state
> inconsistency, which is why I'm looking at this bit of the code.

I don't know if this is relevant to you, but I think the little
fragment you gave would only work correctly if it is called
(synchronously) from the Python main thread.

Good luck,
Hans



More information about the Python-list mailing list