mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
src: ensure GSource background unref happens in correct event loop
The g_idle_add function adds a callback to the primary GMainContext. To workaround the GSource unref bugs, we need to add our callbacks to the GMainContext that is associated with the GSource being unref'd. Thus code using the per-VM virEventThread must use its private GMainContext. Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -1049,9 +1049,6 @@ if host_machine.system() == 'windows'
|
||||
else
|
||||
gio_dep = dependency('gio-unix-2.0', version: '>=' + glib_version)
|
||||
endif
|
||||
# GLib event loop race workaround in glibcompat.h, remove when minimum required
|
||||
# glib is >= 2.64.0
|
||||
glib_crash_workaround = glib_dep.version().version_compare('<2.64.0')
|
||||
glib_dep = declare_dependency(
|
||||
dependencies: [ glib_dep, gobject_dep, gio_dep ],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user