are glib signals asynchronous?

asynchronous, glib, gnome, signals

Solution

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.

Problem

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?

Original source