Re: Compiling a GTK application on windows
- From: Gang Chen <gang chen cn gmail com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: Vikram Narayanan <vikram186 gmail com>, gtk-list <gtk-list gnome org>
- Subject: Re: Compiling a GTK application on windows
- Date: Thu, 2 Jun 2011 09:12:19 +0800
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?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]