[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: GTK+ & GLib threads
- From: John Cupitt <jcupitt gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK+ & GLib threads
- Date: Thu, 2 Sep 2004 13:35:46 +0100
On Thu, 02 Sep 2004 00:10:09 -0400, Todd Fisher <taf2 lehigh edu> wrote:
> You should not use any GUI calls in your background thread. It
> would be better to use something like GAsyncQueue,
> in combination with a timeout function, to send notification to the GUI
> thread, that it should update itself in someway.
> You might find it very useful to search through the archives of this
> mailing list, as this topic has come up quiet often.
I found this mail from Paul Pogonyshev very helpful:
http://mail.gnome.org/archives/gtk-app-devel-list/2004-July/msg00176.html
It shows how to get a background thread to post data to the GUI thread
over an GAsyncQueue, and have the GUI thread woken up automatically
(no timeout polling). I was using a pipe for this and having awful
problems on win32. With Paul's code I have a slick cross-platform
threaded app, very nice.
John
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]