mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-02 14:27:00 -04:00
portal: Don't run method invocations in a thread
Most access to the `client_pid_data_hash` hash table are unsafe due to threading. One approach to solve this would be to protect the hash table with a mutex, but as per a deeper analysis, nothing in these callbacks is slow or heavy enough to justify the need for separate threads. Make method invocations run in the main thread. Closes: https://github.com/flatpak/flatpak/issues/5605
This commit is contained in:
committed by
Simon McVittie
parent
1e43d5dc9e
commit
c11cbbfce1
@@ -2905,9 +2905,6 @@ on_bus_acquired (GDBusConnection *connection,
|
||||
|
||||
g_object_set_data_full (G_OBJECT (portal), "track-alive", GINT_TO_POINTER (42), skeleton_died_cb);
|
||||
|
||||
g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (portal),
|
||||
G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD);
|
||||
|
||||
portal_flatpak_set_version (PORTAL_FLATPAK (portal), 6);
|
||||
portal_flatpak_set_supports (PORTAL_FLATPAK (portal), supports);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user