gtask: Improve task names used internally within GLib

And improve them externally, where not otherwise set, by setting them
from the function name passed to `g_task_set_source_tag()`, if called by
third party code.

This should make profiling and debug output from GLib more useful.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2020-06-25 23:36:08 +01:00
parent 7cd67c935f
commit b08bd04abe
11 changed files with 42 additions and 8 deletions

View File

@@ -632,6 +632,7 @@ g_dbus_interface_method_dispatch_helper (GDBusInterfaceSkeleton *interface
task = g_task_new (interface, NULL, NULL, NULL);
g_task_set_source_tag (task, g_dbus_interface_method_dispatch_helper);
g_task_set_name (task, "[gio] D-Bus interface method dispatch");
g_task_set_task_data (task, data, (GDestroyNotify) dispatch_data_unref);
g_task_run_in_thread (task, dispatch_in_thread_func);
g_object_unref (task);