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

@@ -87,6 +87,7 @@
* GTask *task;
*
* task = g_task_new (initable, cancellable, callback, user_data);
* g_task_set_name (task, G_STRFUNC);
*
* switch (self->priv->state)
* {