mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 00:48:53 +02:00
unlock context when bailing out with a warning. (g_main_context_check):
Sun May 27 05:09:18 2001 Tim Janik <timj@gtk.org> * gmain.c (g_main_context_prepare): unlock context when bailing out with a warning. (g_main_context_check): same here. * gmain.c (g_main_context_check): before returning due to changed pollfds, unlock context. Sun May 27 04:52:28 2001 Tim Janik <timj@gtk.org> * gsignal.[hc] (g_signal_stop_emission_by_name): added variant to stop signal emissions through a detailed_signal string. * gsignal.c (signal_emit_R) (g_signal_emit_valist): account for the fact that g_value_* functions may cause signal emissons by unlocking the global signal system lock around g_value_* functions. (signal_emit_unlocked_R): renamed this from signal_emit_R() to reflect that this functions acquires the lock on its own now.
This commit is contained in:
7
gmain.c
7
gmain.c
@@ -1655,6 +1655,7 @@ g_main_context_prepare (GMainContext *context,
|
||||
{
|
||||
g_warning ("g_main_context_prepare() called recursively from within a source's check() or "
|
||||
"prepare() member.");
|
||||
UNLOCK_CONTEXT (context);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1839,6 +1840,7 @@ g_main_context_check (GMainContext *context,
|
||||
{
|
||||
g_warning ("g_main_context_check() called recursively from within a source's check() or "
|
||||
"prepare() member.");
|
||||
UNLOCK_CONTEXT (context);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1857,7 +1859,10 @@ g_main_context_check (GMainContext *context,
|
||||
* and let the main loop rerun
|
||||
*/
|
||||
if (context->poll_changed)
|
||||
return 0;
|
||||
{
|
||||
UNLOCK_CONTEXT (context);
|
||||
return 0;
|
||||
}
|
||||
#endif /* G_THREADS_ENABLED */
|
||||
|
||||
pollrec = context->poll_records;
|
||||
|
Reference in New Issue
Block a user