On Sun, 8 Jul 2012 00:16:24 +0200 Giuseppe Penone <[email protected]> wrote: > I'm not very experienced in c++ and gtkmm, so far (after reading > http://developer.gnome.org/gdk3/stable/gdk3-Threads.html) > I did protect the following graphics calls: > > 1) from non main threads > 2) the glib timeout calls > > are you saying I have to protect also every single gtk callback? This > would be very bad of gtkmm :(
No. I am saying three things: 1. Don't use the gdk global lock at all with gtkmm; use Glib::Dispatcher instead. 2. However, if you insist on using the gdk global lock, protect all calls to libsigc++ objects which are accessed in more than one thread (and avoid sigc::trackable). Also of course, comply with all the other things in the documentation to which you have referred. 3. Best of all, combine 1 above with reading the attachment to the bug report I mentioned in my earlier post. That will tell you how to program threads safely in gtkmm. (Here is an even more direct html reference to it: http://bugzilla-attachments.gnome.org/attachment.cgi?id=201915 ). Chris _______________________________________________ gtkmm-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtkmm-list
