mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
gtask: Add a g_task_set_name() method
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_get_name(). Locking is avoided by only allowing the name to be set before the GTask is used from another thread. Includes tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@@ -4396,6 +4396,7 @@ g_task_set_priority
|
||||
g_task_set_check_cancellable
|
||||
g_task_set_return_on_cancel
|
||||
g_task_set_source_tag
|
||||
g_task_set_name
|
||||
<SUBSECTION>
|
||||
g_task_report_error
|
||||
g_task_report_new_error
|
||||
@@ -4408,6 +4409,7 @@ g_task_get_return_on_cancel
|
||||
g_task_get_context
|
||||
g_task_get_source_object
|
||||
g_task_get_source_tag
|
||||
g_task_get_name
|
||||
<SUBSECTION>
|
||||
g_task_return_boolean
|
||||
g_task_return_int
|
||||
|
Reference in New Issue
Block a user