Re: g_main_loop and g_async_queue

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

 



On Mon, 5 Jan 2009 07:45:02 -0200
Cris <ternaryd@xxxxxxxxx> wrote:

> 
> Hi,
> 
> Is there a way to have the main loop react upon a message becoming
> available from a different thread on an asynchronous queue?
> 
> I'm having a main loop which is somewhat time critical, and a thread
> which is dedicated to tasks which can take longer and have often a
> lesser priority. I chose to use threads over forks because complex
> data sets need to be exchanged between the two. Is there some other
> method I could use instead of asynchronous queues?

g_idle_add(), or g_idle_add_full(), are intended for use for message
passing to the event loop of the main program thread.  They are thread
safe.

Chris
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux