Combining GTK_MAIN_LOOP with another event loop



I have implemented a separate networking application with libevent and also a GTK Gui. I'm struggling to understand how to integrate the event loops of the two technologies. When my clients connect to the server the server will return a list of entries to be added to a gtkliststore on the client end. What I need to know is how to combine both a libevent event loop,i.e. event_base_loop(base, 0); , with a gtk loop, gtk_main() so that I'm watching events from both technologies.  All attempts I've made thus far tax the cpu:
/*Bad CODE*/
while(1) {
   gtk_main_iteration_do (FALSE);
   event_base_loop(base, 1);
}


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