Re: Multithreaded gtk apps

On 2013-01-13 23:21, Paul Davis wrote:
> just stop doing all of this.
> ensure that there is only 1 thread making calls to GTK/GDK/X.
> if other threads need to get graphical work done, use g_idle_add() or
> its cousins.

Sadly, this is what I recommend as well, especially if you ever want to
run on win32. I would caution against overuse of g_idle_add though.

Recently I've been saving off the data from the thread and then doing
the GUI updates at the start of the next expose/draw. That's worked a
lot better for me than idle callbacks, but that's just my own
experiences, it might not work so well if you're trying to show a dialog

Attachment: pgpu8owEjBg6n.pgp
Description: PGP signature

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