Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

are glib signals asynchronous?

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?

like image 899
jldupont Avatar asked Jan 28 '10 01:01

jldupont


1 Answers

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.

like image 199
jstedfast Avatar answered Sep 23 '22 13:09

jstedfast