Hi Chris, > If you are using raw GTK+ then the easiest way > to do this is to post event callbacks using g_idle_add(), because the > glib main loop is thread safe. If you are using gtkmm, you can use > Glib::Dispatcher for the same purpose (or a thread-safe C++ wrapper for > idle sources, of which there are some available such as in > c++-gtk-utils, but they are relatively easy to write yourself). > Glib::signal_idle().connect() is not thread safe? So I should use Glib::Dispatcher? > However note that libsigc++, which gtkmm uses, is not thread safe, so > the best rule is only to call libsigc++ methods in the main GUI > thread. boost of course has a thread-safe signal/slot implementation > (boost::signal2) so if you use that you can restrict the use of > libsigc++ to the GTK+ thread only, provided you are careful about the > use of sigc::trackable. > Even if I only use libsigc++ in the main thread, shall I still use sigc::trackable? _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list