mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
gmain: do not wakeup the wakeup registration
Do not wakeup immediately for our own context wakeup poll registration. g_main_context_add_poll_unlocked() will call g_wakeup_signal() to wake up the loop waiting in poll(). Doing so during context creation will create an extra wakeup for the first poll(). Skip the wakeup call if it is the wake_up_rec registration. No other sources/caller should ever reach that condition. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
a43723ef17
commit
17ac6642c7
@ -4653,7 +4653,8 @@ g_main_context_add_poll_unlocked (GMainContext *context,
|
||||
context->poll_changed = TRUE;
|
||||
|
||||
/* Now wake up the main loop if it is waiting in the poll() */
|
||||
g_wakeup_signal (context->wakeup);
|
||||
if (fd != &context->wake_up_rec)
|
||||
g_wakeup_signal (context->wakeup);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user