I have created a routine that displays exceptions in a gtk dialog box, which I place in sys.excepthook. I have run into a problem when using this routine with threading.

The sys.excepthook function can be run from all sorts of places, sometimes the gtk lock will be held, other times it won't be. The gdk thread lock is not guaranteed to be recursive (it's just a GMutex, not a GStaticRecMutex), so I can't just call gtk.threads_enter every time as it could deadlock.

Does anyone have a solution to this?

Does anyone else think it would be much easier if the gtk lock was recursive? GDK_THREADS_ENTER is a macro, so I don't think that the lock could be changed from a GMutex to a GStaticRecMutex without breaking binary compatibility.

--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to