mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
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:
@@ -186,6 +186,7 @@ g_tls_database_real_verify_chain_async (GTlsDatabase *self,
|
||||
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
g_task_set_source_tag (task, g_tls_database_real_verify_chain_async);
|
||||
g_task_set_name (task, "[gio] verify TLS chain");
|
||||
g_task_set_task_data (task, args, async_verify_chain_free);
|
||||
g_task_run_in_thread (task, async_verify_chain_thread);
|
||||
g_object_unref (task);
|
||||
@@ -264,6 +265,7 @@ g_tls_database_real_lookup_certificate_for_handle_async (GTlsDatabase
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
g_task_set_source_tag (task,
|
||||
g_tls_database_real_lookup_certificate_for_handle_async);
|
||||
g_task_set_name (task, "[gio] lookup TLS certificate");
|
||||
g_task_set_task_data (task, args, async_lookup_certificate_for_handle_free);
|
||||
g_task_run_in_thread (task, async_lookup_certificate_for_handle_thread);
|
||||
g_object_unref (task);
|
||||
@@ -338,6 +340,7 @@ g_tls_database_real_lookup_certificate_issuer_async (GTlsDatabase *sel
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
g_task_set_source_tag (task,
|
||||
g_tls_database_real_lookup_certificate_issuer_async);
|
||||
g_task_set_name (task, "[gio] lookup certificate issuer");
|
||||
g_task_set_task_data (task, args, async_lookup_certificate_issuer_free);
|
||||
g_task_run_in_thread (task, async_lookup_certificate_issuer_thread);
|
||||
g_object_unref (task);
|
||||
@@ -419,6 +422,7 @@ g_tls_database_real_lookup_certificates_issued_by_async (GTlsDatabase
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
g_task_set_source_tag (task,
|
||||
g_tls_database_real_lookup_certificates_issued_by_async);
|
||||
g_task_set_name (task, "[gio] lookup certificates issued by");
|
||||
g_task_set_task_data (task, args, async_lookup_certificates_issued_by_free);
|
||||
g_task_run_in_thread (task, async_lookup_certificates_issued_by_thread);
|
||||
g_object_unref (task);
|
||||
|
Reference in New Issue
Block a user