Skip to content

gtask: Add a g_task_set_name() method

Philip Withnall requested to merge pwithnall/glib:gtask-set-name into master

Similarly to g_source_set_name(), this sets a name on a GTask for debugging and profiling. Importantly, this name is propagated to the GSource for idle callbacks for the GTask, ending the glorious reign of [gio] complete_in_idle_cb.

The name can be queried using g_task_dup_name(). Locking has to be used as the name could theoretically be set or queried from a GTaskThreadFunc running in another thread.

Includes tests.

Signed-off-by: Philip Withnall withnall@endlessm.com

Merge request reports