Integration with Glib event loop
Unsolved
3rd Party Software
-
I have a C library that requires a GLib event loop to work, it takes a
GMainContext
on initialization and allows me to register callback functions. My solution to integrate it with a Qt application is the classic thread + polling approach, I spawn a thread which every 100ms runs a singleg_main_context_iteration()
. From what I understood, I can't just run the GLib event loop in the thread because it will block there without emitting any Qt signals.Is there an approach that does not involve thread + polling?
-
Hi,
Yes it is, and IIRC, there's already an implementation of the event dispatcher with Glib.