Re: Multiple threads and gtk_main()
- From: Chris Vine <chris cvine freeserve co uk>
- To: Jonathan Winterflood <jonathan winterflood gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Multiple threads and gtk_main()
- Date: Wed, 11 Jul 2007 22:06:05 +0100
On Wed, 2007-07-11 at 08:59 +0200, Jonathan Winterflood wrote:
Hi,
Could the GAsyncQueue be configured to run a callback in the main
thread when a element (or whatever gets pushed into it) is ready, just
like one woud do with a GIOChannel ?
It would be cleaner than a timeout or an idle function I think.
If you want to use it on a Unix system, then a pipe is the cleanest way
to do it. If you don't mind a bit of C++, this is an example:
http://efax-gtk.cvs.sourceforge.net/*checkout*/efax-gtk/efax-gtk/src/utils/notifier.h
http://efax-gtk.cvs.sourceforge.net/*checkout*/efax-gtk/efax-gtk/src/utils/notifier.cpp
If you are using windows it is probably easiest to use a timeout.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]