mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gmain: move finalization of GSource outside of context lock
This avoids ugly deadlock situations such as in https://bugzilla.gnome.org/show_bug.cgi?id=586432 https://bugzilla.gnome.org/show_bug.cgi?id=626702 https://bugzilla.gnome.org/show_bug.cgi?id=634239
This commit is contained in:
parent
3570c4a00e
commit
b358202856
@ -1520,7 +1520,13 @@ g_source_unref_internal (GSource *source,
|
||||
g_source_list_remove (source, context);
|
||||
|
||||
if (source->source_funcs->finalize)
|
||||
source->source_funcs->finalize (source);
|
||||
{
|
||||
if (context)
|
||||
UNLOCK_CONTEXT (context);
|
||||
source->source_funcs->finalize (source);
|
||||
if (context)
|
||||
LOCK_CONTEXT (context);
|
||||
}
|
||||
|
||||
g_free (source->name);
|
||||
source->name = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user