[glib] gio: Add source tags to various GTasks constructed in GLib
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: Add source tags to various GTasks constructed in GLib
- Date: Wed, 29 Jun 2016 14:21:24 +0000 (UTC)
commit 3613b7a3660f2a7d9609faa2d6a4649bdc5f4fe3
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Jun 16 19:39:38 2016 -0400
gio: Add source tags to various GTasks constructed in GLib
This makes them easier to identify when debugging and profiling.
This patch was somewhat less than interesting to write.
https://bugzilla.gnome.org/show_bug.cgi?id=767765
gio/gasyncinitable.c | 1 +
gio/gbufferedinputstream.c | 2 ++
gio/gbufferedoutputstream.c | 2 ++
gio/gbytesicon.c | 1 +
gio/gdatainputstream.c | 1 +
gio/gdbusaddress.c | 1 +
gio/gdbusconnection.c | 6 ++++++
gio/gdbusinterfaceskeleton.c | 1 +
gio/gdbusprivate.c | 2 ++
gio/gdbusproxy.c | 3 +++
gio/gdummyproxyresolver.c | 1 +
gio/gfile.c | 20 ++++++++++++++++++++
gio/gfileenumerator.c | 2 ++
gio/gfileicon.c | 1 +
gio/gfileinputstream.c | 1 +
gio/gfileoutputstream.c | 1 +
gio/ghttpproxy.c | 1 +
gio/ginputstream.c | 6 ++++++
gio/gioscheduler.c | 3 +++
gio/giostream.c | 3 +++
gio/gloadableicon.c | 1 +
gio/gmemoryinputstream.c | 3 +++
gio/gmemoryoutputstream.c | 1 +
gio/gnetworkaddress.c | 1 +
gio/gnetworkmonitor.c | 2 ++
gio/gnetworkmonitorbase.c | 1 +
gio/gnetworkservice.c | 1 +
gio/goutputstream.c | 2 ++
gio/gproxyaddressenumerator.c | 1 +
gio/gsimpleproxyresolver.c | 1 +
gio/gsocketaddressenumerator.c | 1 +
gio/gsocketclient.c | 1 +
gio/gsocketconnection.c | 2 ++
gio/gsocketlistener.c | 1 +
gio/gsocks4aproxy.c | 1 +
gio/gsocks5proxy.c | 1 +
gio/gsubprocess.c | 3 +++
gio/gtcpconnection.c | 1 +
gio/gthreadedresolver.c | 6 ++++++
gio/gtlsdatabase.c | 7 +++++++
gio/gunixconnection.c | 4 ++--
gio/gunixinputstream.c | 1 +
gio/gunixmount.c | 1 +
gio/gunixoutputstream.c | 1 +
gio/gunixvolume.c | 1 +
45 files changed, 103 insertions(+), 2 deletions(-)
---
diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c
index 6076fea..db93201 100644
--- a/gio/gasyncinitable.c
+++ b/gio/gasyncinitable.c
@@ -272,6 +272,7 @@ g_async_initable_real_init_async (GAsyncInitable *initable,
g_return_if_fail (G_IS_INITABLE (initable));
task = g_task_new (initable, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_async_initable_real_init_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, async_init_thread);
g_object_unref (task);
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
index 3b147d4..4a79660 100644
--- a/gio/gbufferedinputstream.c
+++ b/gio/gbufferedinputstream.c
@@ -1079,6 +1079,7 @@ g_buffered_input_stream_real_fill_async (GBufferedInputStream *stream,
compact_buffer (stream);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_buffered_input_stream_real_fill_async);
base_stream = G_FILTER_INPUT_STREAM (stream)->base_stream;
g_input_stream_read_async (base_stream,
@@ -1212,6 +1213,7 @@ g_buffered_input_stream_skip_async (GInputStream *stream,
data = g_slice_new (SkipAsyncData);
data->bytes_skipped = 0;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_buffered_input_stream_skip_async);
g_task_set_task_data (task, data, free_skip_async_data);
available = priv->end - priv->pos;
diff --git a/gio/gbufferedoutputstream.c b/gio/gbufferedoutputstream.c
index ac9b45f..d6bd527 100644
--- a/gio/gbufferedoutputstream.c
+++ b/gio/gbufferedoutputstream.c
@@ -704,6 +704,7 @@ g_buffered_output_stream_flush_async (GOutputStream *stream,
fdata->close_stream = FALSE;
task = g_task_new (stream, cancellable, callback, data);
+ g_task_set_source_tag (task, g_buffered_output_stream_flush_async);
g_task_set_task_data (task, fdata, free_flush_data);
g_task_set_priority (task, io_priority);
@@ -735,6 +736,7 @@ g_buffered_output_stream_close_async (GOutputStream *stream,
fdata->close_stream = TRUE;
task = g_task_new (stream, cancellable, callback, data);
+ g_task_set_source_tag (task, g_buffered_output_stream_close_async);
g_task_set_task_data (task, fdata, free_flush_data);
g_task_set_priority (task, io_priority);
diff --git a/gio/gbytesicon.c b/gio/gbytesicon.c
index 413e8bd..8459f42 100644
--- a/gio/gbytesicon.c
+++ b/gio/gbytesicon.c
@@ -238,6 +238,7 @@ g_bytes_icon_load_async (GLoadableIcon *icon,
GTask *task;
task = g_task_new (icon, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_bytes_icon_load_async);
g_task_return_pointer (task, g_memory_input_stream_new_from_bytes (bytes_icon->bytes), g_object_unref);
g_object_unref (task);
}
diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
index 3753bd8..9a7e722 100644
--- a/gio/gdatainputstream.c
+++ b/gio/gdatainputstream.c
@@ -1085,6 +1085,7 @@ g_data_input_stream_read_async (GDataInputStream *stream,
data->last_saw_cr = FALSE;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_data_input_stream_read_async);
g_task_set_task_data (task, data, g_data_input_stream_read_data_free);
g_task_set_priority (task, io_priority);
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 7c294f7..a004011 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -865,6 +865,7 @@ g_dbus_address_get_stream (const gchar *address,
data->address = g_strdup (address);
task = g_task_new (NULL, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dbus_address_get_stream);
g_task_set_task_data (task, data, (GDestroyNotify) get_stream_data_free);
g_task_run_in_thread (task, get_stream_thread_func);
g_object_unref (task);
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 313670b..8977c67 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -1250,6 +1250,7 @@ g_dbus_connection_flush (GDBusConnection *connection,
g_return_if_fail (G_IS_DBUS_CONNECTION (connection));
task = g_task_new (connection, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dbus_connection_flush);
g_task_run_in_thread (task, flush_in_thread_func);
g_object_unref (task);
}
@@ -1446,6 +1447,7 @@ g_dbus_connection_close (GDBusConnection *connection,
g_assert (connection->worker != NULL);
task = g_task_new (connection, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dbus_connection_close);
_g_dbus_worker_close (connection->worker, task);
g_object_unref (task);
}
@@ -1904,6 +1906,8 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
data = g_slice_new0 (SendMessageData);
task = g_task_new (connection, cancellable, callback, user_data);
+ g_task_set_source_tag (task,
+ g_dbus_connection_send_message_with_reply_unlocked);
g_task_set_task_data (task, data, (GDestroyNotify) send_message_data_free);
if (g_task_return_error_if_cancelled (task))
@@ -5772,6 +5776,7 @@ g_dbus_connection_call_internal (GDBusConnection *connection,
state->reply_type = g_variant_type_copy (reply_type);
task = g_task_new (connection, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dbus_connection_call_internal);
g_task_set_task_data (task, state, (GDestroyNotify) call_state_free);
g_dbus_connection_send_message_with_reply (connection,
@@ -7312,6 +7317,7 @@ g_bus_get (GBusType bus_type,
GError *error = NULL;
task = g_task_new (NULL, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_bus_get);
connection = get_uninitialized_connection (bus_type, cancellable, &error);
if (connection == NULL)
diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c
index e5f27af..b96be3f 100644
--- a/gio/gdbusinterfaceskeleton.c
+++ b/gio/gdbusinterfaceskeleton.c
@@ -627,6 +627,7 @@ g_dbus_interface_method_dispatch_helper (GDBusInterfaceSkeleton *interface
data->ref_count = 1;
task = g_task_new (interface, NULL, NULL, NULL);
+ g_task_set_source_tag (task, g_dbus_interface_method_dispatch_helper);
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);
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
index a52bec2..840a554 100644
--- a/gio/gdbusprivate.c
+++ b/gio/gdbusprivate.c
@@ -173,6 +173,7 @@ _g_socket_read_with_control_messages (GSocket *socket,
data->num_messages = num_messages;
task = g_task_new (socket, cancellable, callback, user_data);
+ g_task_set_source_tag (task, _g_socket_read_with_control_messages);
g_task_set_task_data (task, data, (GDestroyNotify) read_with_control_data_free);
if (g_socket_condition_check (socket, G_IO_IN))
@@ -1091,6 +1092,7 @@ write_message_async (GDBusWorker *worker,
gpointer user_data)
{
data->task = g_task_new (NULL, NULL, callback, user_data);
+ g_task_set_source_tag (data->task, write_message_async);
data->total_written = 0;
write_message_continue_writing (data);
}
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index 919f333..d98ffec 100644
--- a/gio/gdbusproxy.c
+++ b/gio/gdbusproxy.c
@@ -1679,6 +1679,7 @@ async_initable_init_second_async (GAsyncInitable *initable,
GTask *task;
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, async_initable_init_second_async);
g_task_set_priority (task, io_priority);
/* Check name ownership asynchronously - possibly also start the service */
@@ -1848,6 +1849,7 @@ async_initable_init_async (GAsyncInitable *initable,
GTask *task;
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, async_initable_init_async);
g_task_set_priority (task, io_priority);
if (proxy->priv->bus_type != G_BUS_TYPE_NONE)
@@ -2674,6 +2676,7 @@ g_dbus_proxy_call_internal (GDBusProxy *proxy,
{
my_callback = (GAsyncReadyCallback) reply_cb;
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dbus_proxy_call_internal);
}
else
{
diff --git a/gio/gdummyproxyresolver.c b/gio/gdummyproxyresolver.c
index 4bf53b1..eddd60a 100644
--- a/gio/gdummyproxyresolver.c
+++ b/gio/gdummyproxyresolver.c
@@ -95,6 +95,7 @@ g_dummy_proxy_resolver_lookup_async (GProxyResolver *resolver,
gchar **proxies;
task = g_task_new (resolver, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_dummy_proxy_resolver_lookup_async);
proxies = g_dummy_proxy_resolver_lookup (resolver, uri, cancellable, &error);
if (proxies)
diff --git a/gio/gfile.c b/gio/gfile.c
index 29c61f6..851213e 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -5420,6 +5420,7 @@ g_file_real_query_info_async (GFile *file,
data->flags = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_query_info_async);
g_task_set_task_data (task, data, (GDestroyNotify)query_info_data_free);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, query_info_async_thread);
@@ -5464,6 +5465,7 @@ g_file_real_query_filesystem_info_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_query_filesystem_info_async);
g_task_set_task_data (task, g_strdup (attributes), g_free);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, query_filesystem_info_async_thread);
@@ -5514,6 +5516,7 @@ g_file_real_enumerate_children_async (GFile *file,
data->flags = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_enumerate_children_async);
g_task_set_task_data (task, data, (GDestroyNotify)query_info_data_free);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, enumerate_children_async_thread);
@@ -5556,6 +5559,7 @@ g_file_real_read_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_read_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, open_read_async_thread);
g_object_unref (task);
@@ -5603,6 +5607,7 @@ g_file_real_append_to_async (GFile *file,
*data = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_append_to_async);
g_task_set_task_data (task, data, g_free);
g_task_set_priority (task, io_priority);
@@ -5652,6 +5657,7 @@ g_file_real_create_async (GFile *file,
*data = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_create_async);
g_task_set_task_data (task, data, g_free);
g_task_set_priority (task, io_priority);
@@ -5727,6 +5733,7 @@ g_file_real_replace_async (GFile *file,
data->flags = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_replace_async);
g_task_set_task_data (task, data, (GDestroyNotify)replace_async_data_free);
g_task_set_priority (task, io_priority);
@@ -5768,6 +5775,7 @@ g_file_real_delete_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_delete_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, delete_async_thread);
g_object_unref (task);
@@ -5807,6 +5815,7 @@ g_file_real_trash_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_trash_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, trash_async_thread);
g_object_unref (task);
@@ -5846,6 +5855,7 @@ g_file_real_make_directory_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_make_directory_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, make_directory_async_thread);
g_object_unref (task);
@@ -5888,6 +5898,7 @@ g_file_real_open_readwrite_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_open_readwrite_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, open_readwrite_async_thread);
@@ -5937,6 +5948,7 @@ g_file_real_create_readwrite_async (GFile *file,
*data = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_create_readwrite_async);
g_task_set_task_data (task, data, g_free);
g_task_set_priority (task, io_priority);
@@ -6009,6 +6021,7 @@ g_file_real_replace_readwrite_async (GFile *file,
data->flags = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_replace_readwrite_async);
g_task_set_task_data (task, data, (GDestroyNotify)replace_rw_async_data_free);
g_task_set_priority (task, io_priority);
@@ -6055,6 +6068,7 @@ g_file_real_set_display_name_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_set_display_name_async);
g_task_set_task_data (task, g_strdup (display_name), g_free);
g_task_set_priority (task, io_priority);
@@ -6122,6 +6136,7 @@ g_file_real_set_attributes_async (GFile *file,
data->flags = flags;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_set_attributes_async);
g_task_set_task_data (task, data, (GDestroyNotify)set_info_data_free);
g_task_set_priority (task, io_priority);
@@ -6177,6 +6192,7 @@ g_file_real_find_enclosing_mount_async (GFile *file,
GTask *task;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_find_enclosing_mount_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, find_enclosing_mount_async_thread);
@@ -6295,6 +6311,7 @@ g_file_real_copy_async (GFile *source,
data->progress_cb_data = progress_callback_data;
task = g_task_new (source, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_copy_async);
g_task_set_task_data (task, data, (GDestroyNotify)copy_async_data_free);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, copy_async_thread);
@@ -6975,6 +6992,7 @@ g_file_load_partial_contents_async (GFile *file,
data->content = g_byte_array_new ();
data->task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (data->task, g_file_load_partial_contents_async);
g_task_set_task_data (data->task, data, (GDestroyNotify)load_contents_data_free);
g_file_read_async (file,
@@ -7418,6 +7436,7 @@ g_file_replace_contents_bytes_async (GFile *file,
data->content = g_bytes_ref (contents);
data->task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (data->task, g_file_replace_contents_bytes_async);
g_task_set_task_data (data->task, data, (GDestroyNotify)replace_contents_data_free);
g_file_replace_async (file,
@@ -7589,6 +7608,7 @@ g_file_real_measure_disk_usage_async (GFile *file,
data.progress_data = progress_data;
task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_real_measure_disk_usage_async);
g_task_set_task_data (task, g_memdup (&data, sizeof data), g_free);
g_task_set_priority (task, io_priority);
diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c
index 954d426..3763cb6 100644
--- a/gio/gfileenumerator.c
+++ b/gio/gfileenumerator.c
@@ -803,6 +803,7 @@ g_file_enumerator_real_next_files_async (GFileEnumerator *enumerator,
GTask *task;
task = g_task_new (enumerator, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_enumerator_real_next_files_async);
g_task_set_task_data (task, GINT_TO_POINTER (num_files), NULL);
g_task_set_priority (task, io_priority);
@@ -849,6 +850,7 @@ g_file_enumerator_real_close_async (GFileEnumerator *enumerator,
GTask *task;
task = g_task_new (enumerator, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_enumerator_real_close_async);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, close_async_thread);
diff --git a/gio/gfileicon.c b/gio/gfileicon.c
index 2eaec7b..793a2ab 100644
--- a/gio/gfileicon.c
+++ b/gio/gfileicon.c
@@ -322,6 +322,7 @@ g_file_icon_load_async (GLoadableIcon *icon,
GTask *task;
task = g_task_new (icon, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_icon_load_async);
g_file_read_async (file_icon->file, 0,
cancellable,
diff --git a/gio/gfileinputstream.c b/gio/gfileinputstream.c
index 41014d4..273bd22 100644
--- a/gio/gfileinputstream.c
+++ b/gio/gfileinputstream.c
@@ -410,6 +410,7 @@ g_file_input_stream_real_query_info_async (GFileInputStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_input_stream_real_query_info_async);
g_task_set_task_data (task, g_strdup (attributes), g_free);
g_task_set_priority (task, io_priority);
diff --git a/gio/gfileoutputstream.c b/gio/gfileoutputstream.c
index 2754405..61987ca 100644
--- a/gio/gfileoutputstream.c
+++ b/gio/gfileoutputstream.c
@@ -513,6 +513,7 @@ g_file_output_stream_real_query_info_async (GFileOutputStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_output_stream_real_query_info_async);
g_task_set_task_data (task, g_strdup (attributes), g_free);
g_task_set_priority (task, io_priority);
diff --git a/gio/ghttpproxy.c b/gio/ghttpproxy.c
index 0bd11d3..18ceb8b 100644
--- a/gio/ghttpproxy.c
+++ b/gio/ghttpproxy.c
@@ -327,6 +327,7 @@ g_http_proxy_connect_async (GProxy *proxy,
data->proxy_address = g_object_ref (proxy_address);
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_http_proxy_connect_async);
g_task_set_task_data (task, data, (GDestroyNotify) free_connect_data);
g_task_run_in_thread (task, connect_thread);
diff --git a/gio/ginputstream.c b/gio/ginputstream.c
index af89492..772bd1f 100644
--- a/gio/ginputstream.c
+++ b/gio/ginputstream.c
@@ -783,6 +783,7 @@ g_input_stream_read_all_async (GInputStream *stream,
data->buffer = buffer;
data->to_read = count;
+ g_task_set_source_tag (task, g_input_stream_read_all_async);
g_task_set_task_data (task, data, free_async_read_all);
g_task_set_priority (task, io_priority);
@@ -919,6 +920,8 @@ g_input_stream_read_bytes_async (GInputStream *stream,
guchar *buf;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_input_stream_read_bytes_async);
+
buf = g_malloc (count);
g_task_set_task_data (task, buf, NULL);
@@ -1378,6 +1381,7 @@ g_input_stream_real_read_async (GInputStream *stream,
op = g_slice_new0 (ReadData);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_input_stream_real_read_async);
g_task_set_task_data (task, op, (GDestroyNotify) free_read_data);
g_task_set_priority (task, io_priority);
op->buffer = buffer;
@@ -1489,6 +1493,7 @@ g_input_stream_real_skip_async (GInputStream *stream,
class = G_INPUT_STREAM_GET_CLASS (stream);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_input_stream_real_skip_async);
g_task_set_priority (task, io_priority);
if (g_input_stream_async_read_is_via_threads (stream))
@@ -1564,6 +1569,7 @@ g_input_stream_real_close_async (GInputStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_input_stream_real_close_async);
g_task_set_check_cancellable (task, FALSE);
g_task_set_priority (task, io_priority);
diff --git a/gio/gioscheduler.c b/gio/gioscheduler.c
index 4c826c6..f1632af 100644
--- a/gio/gioscheduler.c
+++ b/gio/gioscheduler.c
@@ -138,6 +138,9 @@ g_io_scheduler_push_job (GIOSchedulerJobFunc job_func,
G_UNLOCK (active_jobs);
task = g_task_new (NULL, cancellable, NULL, NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ g_task_set_source_tag (task, g_io_scheduler_push_job);
+G_GNUC_END_IGNORE_DEPRECATIONS
g_task_set_task_data (task, job, (GDestroyNotify)g_io_job_free);
g_task_set_priority (task, io_priority);
g_task_run_in_thread (task, io_job_thread);
diff --git a/gio/giostream.c b/gio/giostream.c
index 19522cb..c50a0eb 100644
--- a/gio/giostream.c
+++ b/gio/giostream.c
@@ -492,6 +492,7 @@ g_io_stream_close_async (GIOStream *stream,
g_return_if_fail (G_IS_IO_STREAM (stream));
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_io_stream_close_async);
if (stream->priv->closed)
{
@@ -624,6 +625,7 @@ g_io_stream_real_close_async (GIOStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_io_stream_real_close_async);
g_task_set_check_cancellable (task, FALSE);
g_task_set_priority (task, io_priority);
@@ -870,6 +872,7 @@ g_io_stream_splice_async (GIOStream *stream1,
ctx->completed = 0;
task = g_task_new (NULL, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_io_stream_splice_async);
g_task_set_task_data (task, ctx, (GDestroyNotify) splice_context_free);
if (cancellable != NULL)
diff --git a/gio/gloadableicon.c b/gio/gloadableicon.c
index 17321bc..6dba5fe 100644
--- a/gio/gloadableicon.c
+++ b/gio/gloadableicon.c
@@ -200,6 +200,7 @@ g_loadable_icon_real_load_async (GLoadableIcon *icon,
LoadData *data;
task = g_task_new (icon, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_loadable_icon_real_load_async);
data = g_new0 (LoadData, 1);
g_task_set_task_data (task, data, (GDestroyNotify) load_data_free);
g_task_run_in_thread (task, load_async_thread);
diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c
index d822588..b205119 100644
--- a/gio/gmemoryinputstream.c
+++ b/gio/gmemoryinputstream.c
@@ -379,6 +379,8 @@ g_memory_input_stream_skip_async (GInputStream *stream,
nskipped = G_INPUT_STREAM_GET_CLASS (stream)->skip (stream, count, cancellable, &error);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_memory_input_stream_skip_async);
+
if (error)
g_task_return_error (task, error);
else
@@ -406,6 +408,7 @@ g_memory_input_stream_close_async (GInputStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_memory_input_stream_close_async);
g_task_return_boolean (task, TRUE);
g_object_unref (task);
}
diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c
index 90b5587..9f6e766 100644
--- a/gio/gmemoryoutputstream.c
+++ b/gio/gmemoryoutputstream.c
@@ -693,6 +693,7 @@ g_memory_output_stream_close_async (GOutputStream *stream,
GTask *task;
task = g_task_new (stream, cancellable, callback, data);
+ g_task_set_source_tag (task, g_memory_output_stream_close_async);
/* will always return TRUE */
g_memory_output_stream_close (stream, cancellable, NULL);
diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c
index 99c495a..6e01227 100644
--- a/gio/gnetworkaddress.c
+++ b/gio/gnetworkaddress.c
@@ -1006,6 +1006,7 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator *enum
GTask *task;
task = g_task_new (addr_enum, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_network_address_address_enumerator_next_async);
if (addr_enum->addresses == NULL)
{
diff --git a/gio/gnetworkmonitor.c b/gio/gnetworkmonitor.c
index 42cfedc..3362c7f 100644
--- a/gio/gnetworkmonitor.c
+++ b/gio/gnetworkmonitor.c
@@ -224,6 +224,8 @@ g_network_monitor_real_can_reach_async (GNetworkMonitor *monitor,
GError *error = NULL;
task = g_task_new (monitor, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_network_monitor_real_can_reach_async);
+
if (g_network_monitor_can_reach (monitor, connectable, cancellable, &error))
g_task_return_boolean (task, TRUE);
else
diff --git a/gio/gnetworkmonitorbase.c b/gio/gnetworkmonitorbase.c
index 7d34712..744bc2b 100644
--- a/gio/gnetworkmonitorbase.c
+++ b/gio/gnetworkmonitorbase.c
@@ -302,6 +302,7 @@ g_network_monitor_base_can_reach_async (GNetworkMonitor *monitor,
GSocketAddressEnumerator *enumerator;
task = g_task_new (monitor, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_network_monitor_base_can_reach_async);
if (G_NETWORK_MONITOR_BASE (monitor)->priv->networks->len == 0)
{
diff --git a/gio/gnetworkservice.c b/gio/gnetworkservice.c
index 57c8e8f..d2b9017 100644
--- a/gio/gnetworkservice.c
+++ b/gio/gnetworkservice.c
@@ -545,6 +545,7 @@ g_network_service_address_enumerator_next_async (GSocketAddressEnumerator *enum
GTask *task;
task = g_task_new (enumerator, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_network_service_address_enumerator_next_async);
/* If we haven't yet resolved srv, do that */
if (!srv_enum->srv->priv->targets)
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index 9320f8e..db91450 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -998,6 +998,7 @@ g_output_stream_write_all_async (GOutputStream *stream,
data->buffer = buffer;
data->to_write = count;
+ g_task_set_source_tag (task, g_output_stream_write_all_async);
g_task_set_task_data (task, data, free_async_write_all);
g_task_set_priority (task, io_priority);
@@ -1115,6 +1116,7 @@ g_output_stream_write_bytes_async (GOutputStream *stream,
data = g_bytes_get_data (bytes, &size);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_output_stream_write_bytes_async);
g_task_set_task_data (task, g_bytes_ref (bytes),
(GDestroyNotify) g_bytes_unref);
diff --git a/gio/gproxyaddressenumerator.c b/gio/gproxyaddressenumerator.c
index c34fca9..be2d9cb 100644
--- a/gio/gproxyaddressenumerator.c
+++ b/gio/gproxyaddressenumerator.c
@@ -527,6 +527,7 @@ g_proxy_address_enumerator_next_async (GSocketAddressEnumerator *enumerator,
GTask *task;
task = g_task_new (enumerator, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_proxy_address_enumerator_next_async);
g_task_set_task_data (task, priv, NULL);
if (priv->proxies == NULL)
diff --git a/gio/gsimpleproxyresolver.c b/gio/gsimpleproxyresolver.c
index 8610e2b..ea95280 100644
--- a/gio/gsimpleproxyresolver.c
+++ b/gio/gsimpleproxyresolver.c
@@ -377,6 +377,7 @@ g_simple_proxy_resolver_lookup_async (GProxyResolver *proxy_resolver,
char **proxies;
task = g_task_new (resolver, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_simple_proxy_resolver_lookup_async);
proxies = g_simple_proxy_resolver_lookup (proxy_resolver, uri,
cancellable, &error);
diff --git a/gio/gsocketaddressenumerator.c b/gio/gsocketaddressenumerator.c
index 51ca4a5..f703f57 100644
--- a/gio/gsocketaddressenumerator.c
+++ b/gio/gsocketaddressenumerator.c
@@ -98,6 +98,7 @@ g_socket_address_enumerator_real_next_async (GSocketAddressEnumerator *enumerato
GError *error = NULL;
task = g_task_new (enumerator, NULL, callback, user_data);
+ g_task_set_source_tag (task, g_socket_address_enumerator_real_next_async);
address = g_socket_address_enumerator_next (enumerator, cancellable, &error);
if (error)
diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
index 2b339d7..2a83665 100644
--- a/gio/gsocketclient.c
+++ b/gio/gsocketclient.c
@@ -1679,6 +1679,7 @@ g_socket_client_connect_async (GSocketClient *client,
data->enumerator = g_socket_connectable_enumerate (connectable);
data->task = g_task_new (client, cancellable, callback, user_data);
+ g_task_set_source_tag (data->task, g_socket_client_connect_async);
g_task_set_task_data (data->task, data, (GDestroyNotify)g_socket_client_async_connect_data_free);
enumerator_next_async (data);
diff --git a/gio/gsocketconnection.c b/gio/gsocketconnection.c
index 4918279..a452bc3 100644
--- a/gio/gsocketconnection.c
+++ b/gio/gsocketconnection.c
@@ -196,6 +196,7 @@ g_socket_connection_connect_async (GSocketConnection *connection,
g_return_if_fail (G_IS_SOCKET_ADDRESS (address));
task = g_task_new (connection, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_socket_connection_connect_async);
g_socket_set_blocking (connection->priv->socket, FALSE);
@@ -501,6 +502,7 @@ g_socket_connection_close_async (GIOStream *stream,
class = G_IO_STREAM_GET_CLASS (stream);
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_socket_connection_close_async);
/* socket close is not blocked, just do it! */
error = NULL;
diff --git a/gio/gsocketlistener.c b/gio/gsocketlistener.c
index 4cf51d1..cd4f78f 100644
--- a/gio/gsocketlistener.c
+++ b/gio/gsocketlistener.c
@@ -813,6 +813,7 @@ g_socket_listener_accept_socket_async (GSocketListener *listener,
GError *error = NULL;
task = g_task_new (listener, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_socket_listener_accept_socket_async);
if (!check_listener (listener, &error))
{
diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c
index d54a816..4fcabc8 100644
--- a/gio/gsocks4aproxy.c
+++ b/gio/gsocks4aproxy.c
@@ -316,6 +316,7 @@ g_socks4a_proxy_connect_async (GProxy *proxy,
data->io_stream = g_object_ref (io_stream);
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_socks4a_proxy_connect_async);
g_task_set_task_data (task, data, (GDestroyNotify) free_connect_data);
hostname = g_proxy_address_get_destination_hostname (proxy_address);
diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c
index 764f9cf..93b9497 100644
--- a/gio/gsocks5proxy.c
+++ b/gio/gsocks5proxy.c
@@ -626,6 +626,7 @@ g_socks5_proxy_connect_async (GProxy *proxy,
data->io_stream = g_object_ref (io_stream);
task = g_task_new (proxy, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_socks5_proxy_connect_async);
g_task_set_task_data (task, data, (GDestroyNotify) free_connect_data);
g_object_get (G_OBJECT (proxy_address),
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index 170e7e7..0567f1f 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -849,6 +849,7 @@ g_subprocess_wait_async (GSubprocess *subprocess,
GTask *task;
task = g_task_new (subprocess, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_subprocess_wait_async);
g_mutex_lock (&subprocess->pending_waits_lock);
if (subprocess->pid)
@@ -1518,6 +1519,8 @@ g_subprocess_communicate_internal (GSubprocess *subprocess,
GTask *task;
task = g_task_new (subprocess, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_subprocess_communicate_internal);
+
state = g_slice_new0 (CommunicateState);
g_task_set_task_data (task, state, g_subprocess_communicate_state_free);
diff --git a/gio/gtcpconnection.c b/gio/gtcpconnection.c
index 8ff355d..9660a89 100644
--- a/gio/gtcpconnection.c
+++ b/gio/gtcpconnection.c
@@ -261,6 +261,7 @@ g_tcp_connection_close_async (GIOStream *stream,
!g_cancellable_is_cancelled (cancellable) /* Cancelled -> close fast */)
{
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_tcp_connection_close_async);
g_task_set_priority (task, io_priority);
socket = g_socket_connection_get_socket (G_SOCKET_CONNECTION (stream));
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index 2ba42f1..b1b46e9 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -141,6 +141,7 @@ lookup_by_name (GResolver *resolver,
GList *addresses;
task = g_task_new (resolver, cancellable, NULL, NULL);
+ g_task_set_source_tag (task, lookup_by_name);
g_task_set_task_data (task, g_strdup (hostname), g_free);
g_task_set_return_on_cancel (task, TRUE);
g_task_run_in_thread_sync (task, do_lookup_by_name);
@@ -160,6 +161,7 @@ lookup_by_name_async (GResolver *resolver,
GTask *task;
task = g_task_new (resolver, cancellable, callback, user_data);
+ g_task_set_source_tag (task, lookup_by_name_async);
g_task_set_task_data (task, g_strdup (hostname), g_free);
g_task_set_return_on_cancel (task, TRUE);
g_task_run_in_thread (task, do_lookup_by_name);
@@ -225,6 +227,7 @@ lookup_by_address (GResolver *resolver,
gchar *name;
task = g_task_new (resolver, cancellable, NULL, NULL);
+ g_task_set_source_tag (task, lookup_by_address);
g_task_set_task_data (task, g_object_ref (address), g_object_unref);
g_task_set_return_on_cancel (task, TRUE);
g_task_run_in_thread_sync (task, do_lookup_by_address);
@@ -244,6 +247,7 @@ lookup_by_address_async (GResolver *resolver,
GTask *task;
task = g_task_new (resolver, cancellable, callback, user_data);
+ g_task_set_source_tag (task, lookup_by_address_async);
g_task_set_task_data (task, g_object_ref (address), g_object_unref);
g_task_set_return_on_cancel (task, TRUE);
g_task_run_in_thread (task, do_lookup_by_address);
@@ -875,6 +879,7 @@ lookup_records (GResolver *resolver,
LookupRecordsData *lrd;
task = g_task_new (resolver, cancellable, NULL, NULL);
+ g_task_set_source_tag (task, lookup_records);
lrd = g_slice_new (LookupRecordsData);
lrd->rrname = g_strdup (rrname);
@@ -901,6 +906,7 @@ lookup_records_async (GResolver *resolver,
LookupRecordsData *lrd;
task = g_task_new (resolver, cancellable, callback, user_data);
+ g_task_set_source_tag (task, lookup_records_async);
lrd = g_slice_new (LookupRecordsData);
lrd->rrname = g_strdup (rrname);
diff --git a/gio/gtlsdatabase.c b/gio/gtlsdatabase.c
index 8441e24..f139891 100644
--- a/gio/gtlsdatabase.c
+++ b/gio/gtlsdatabase.c
@@ -182,6 +182,7 @@ g_tls_database_real_verify_chain_async (GTlsDatabase *self,
args->flags = flags;
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_task_data (task, args, async_verify_chain_free);
g_task_run_in_thread (task, async_verify_chain_thread);
g_object_unref (task);
@@ -258,6 +259,8 @@ g_tls_database_real_lookup_certificate_for_handle_async (GTlsDatabase
args->interaction = interaction ? g_object_ref (interaction) : NULL;
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_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);
@@ -330,6 +333,8 @@ g_tls_database_real_lookup_certificate_issuer_async (GTlsDatabase *sel
args->interaction = interaction ? g_object_ref (interaction) : NULL;
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_task_data (task, args, async_lookup_certificate_issuer_free);
g_task_run_in_thread (task, async_lookup_certificate_issuer_thread);
g_object_unref (task);
@@ -409,6 +414,8 @@ g_tls_database_real_lookup_certificates_issued_by_async (GTlsDatabase
args->interaction = interaction ? g_object_ref (interaction) : NULL;
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_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);
diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c
index 3bfbd4f..f87be31 100644
--- a/gio/gunixconnection.c
+++ b/gio/gunixconnection.c
@@ -409,7 +409,7 @@ g_unix_connection_send_credentials_async (GUnixConnection *connection,
GTask *task;
task = g_task_new (connection, cancellable, callback, user_data);
-
+ g_task_set_source_tag (task, g_unix_connection_send_credentials_async);
g_task_run_in_thread (task, send_credentials_async_thread);
}
@@ -670,7 +670,7 @@ g_unix_connection_receive_credentials_async (GUnixConnection *connection,
GTask *task;
task = g_task_new (connection, cancellable, callback, user_data);
-
+ g_task_set_source_tag (task, g_unix_connection_receive_credentials_async);
g_task_run_in_thread (task, receive_credentials_async_thread);
}
diff --git a/gio/gunixinputstream.c b/gio/gunixinputstream.c
index 660111e..3cfb62a 100644
--- a/gio/gunixinputstream.c
+++ b/gio/gunixinputstream.c
@@ -460,6 +460,7 @@ g_unix_input_stream_close_async (GInputStream *stream,
GError *error = NULL;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_unix_input_stream_close_async);
g_task_set_priority (task, io_priority);
if (g_unix_input_stream_close (stream, cancellable, &error))
diff --git a/gio/gunixmount.c b/gio/gunixmount.c
index 216f8ed..278d1f4 100644
--- a/gio/gunixmount.c
+++ b/gio/gunixmount.c
@@ -309,6 +309,7 @@ eject_unmount_do (GMount *mount,
GSource *timeout;
task = g_task_new (mount, cancellable, callback, user_data);
+ g_task_set_source_tag (task, eject_unmount_do);
g_task_set_task_data (task, g_strdupv (argv), (GDestroyNotify) g_strfreev);
if (unix_mount->volume_monitor != NULL)
diff --git a/gio/gunixoutputstream.c b/gio/gunixoutputstream.c
index 4b5519b..36b3d39 100644
--- a/gio/gunixoutputstream.c
+++ b/gio/gunixoutputstream.c
@@ -424,6 +424,7 @@ g_unix_output_stream_close_async (GOutputStream *stream,
GError *error = NULL;
task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_unix_output_stream_close_async);
g_task_set_priority (task, io_priority);
if (g_unix_output_stream_close (stream, cancellable, &error))
diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c
index 981f703..6b58f23 100644
--- a/gio/gunixvolume.c
+++ b/gio/gunixvolume.c
@@ -307,6 +307,7 @@ eject_mount_do (GVolume *volume,
GTask *task;
task = g_task_new (volume, cancellable, callback, user_data);
+ g_task_set_source_tag (task, eject_mount_do);
if (g_task_return_error_if_cancelled (task))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]