Re: gtkmm 3.4.0 (gtk 3.4.2) multithread app graphic deterioration
- From: Giuseppe Penone <giuspen gmail com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: Gtkmm list <gtkmm-list gnome org>
- Subject: Re: gtkmm 3.4.0 (gtk 3.4.2) multithread app graphic deterioration
- Date: Sun, 8 Jul 2012 08:53:28 +0200
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.
Giuseppe.
On Sun, Jul 8, 2012 at 2:15 AM, Chris Vine
<chris cvine freeserve co uk> wrote:
On Sun, 8 Jul 2012 00:16:24 +0200
Giuseppe Penone <
giuspen gmail com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]