Re: Proper way to provide gtk+ app with asynchronous data?

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

 



John Cupitt wrote:

I don't use the threads enter/leave stuff (it's much too annoying and fragile, in my opinion). Instead I have all gtk stuff in the main GUI thread and have a pipe which workers can post pointers down. The GUI thread uses gtk_input_add() so that it gets woken up when data arrives from the pipe.


Just make sure that you have a lock around any code that touches the data the pointer is pointing to, and this approach is definitely one of the best.


--
Christer Palm
_______________________________________________

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