Re: Multiple threads and gtk_main()
- From: "Jonathan Winterflood" <jonathan winterflood gmail com>
- To: "Chris Vine" <chris cvine freeserve co uk>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Multiple threads and gtk_main()
- Date: Wed, 11 Jul 2007 08:59:05 +0200
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.
Jonathan
On 7/10/07, Chris Vine <chris cvine freeserve co uk> wrote:
On Tue, 2007-07-10 at 13:10 -0300, Eduardo M KALINOWSKI wrote:
[snip]
> Make your threads add stuff to a single GAsyncQueue. Let an idle
> function (or a timeout function) always run, that checks the GAsyncQueue
> and does something if there is something to do, or simply returns if it
> is empty. Wouldn't that work?
That would work with a timeout, but not with an idle function. Using
g_idle_add() in this way would create a busy loop.
Chris
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
<Morpheus> linux, c'est une question de VI ou de MORE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]