[Orbit-python-list] threading, main loop
Status: Inactive
Brought to you by:
tack
From: Brian C. <bc...@th...> - 2002-02-08 20:18:57
|
I'm starting to think the main loop problems are due to python's thread locking. The glib main loop stuff looks fairly straight-forward, and everything seems to be handled correctly. pygtk and orbit-python both make use of PyEval_SaveThread() and PyEval_RestoreThread() when invoking callbacks. They reference different global PyThreadState variables, and each assumes that they called PyEval_SaveThread() prior to getting a callback. The PyEval_SaveThread() calls are in their respective main()/run() methods. So when a callback occurs, one of the two libraries is going to do a restore on an uninitialized state variable. If gtk.mainloop() is called, this causes python to explicitly abort when a corba event occurs, complaining about the state info. If orb.run() is called instead, the gtk main loop is blocked for some reason I haven't figured out -- so there's no error, but gtk also fails to run. b.c. |