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



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



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