views:

64

answers:

1

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?

+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