Re: gtkmm 3.4.0 (gtk 3.4.2) multithread app graphic deterioration



On Sun, 8 Jul 2012 08:53:28 +0200
Giuseppe Penone <giuspen gmail com> wrote:
> Thank you Chris, I'll read more about this Glib::Dispatcher, in the
> past I already took a look but then discouraged and used gdk lock
> that I already was able to use.

The main problem you will come across using Glib::Dispatcher is passing
data to the callback.  For that, it is best to use an asynchronous
queue.

In another posting you said your program does a lot of input-output.
You don't need threads just for that: you can set up a watch on a
file descriptor for the main GUI thread using
Glib::signal_io().connect(). GIO/giomm also has a wide range of
asynchronous IO functions where all the hard work is done for you.

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]