When using glib to dispatch signals through emit
, are all the "listeners"/handlers called back-to-back or is control relinquished to the event loop after each listener/handler?
views:
64answers:
1
+3
A:
The callbacks are all called back-to-back without relinquishing control to the main loop.
Actually, as far as I know, g_signal_emit() does not even return control until all handlers are called, so there is no opportunity for the main-loop to kick-in.
So to answer the question in the title of this post: no, glib signals are not asynchronous.
jstedfast
2010-01-28 04:05:57