[tracker] libtracker-data: Lock data-manager-init for concurrent async init
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Lock data-manager-init for concurrent async init
- Date: Wed, 2 Mar 2011 12:46:35 +0000 (UTC)
commit c877763f7af5bd56eb3607aa832a6d5fe51bc968
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Mar 2 13:45:19 2011 +0100
libtracker-data: Lock data-manager-init for concurrent async init
src/libtracker-data/tracker-data-manager.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 16f229f..1a95d1c 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -4146,6 +4146,9 @@ tracker_data_manager_init_thread (GSimpleAsyncResult *result,
InitAsyncData *data;
gboolean result_b;
GError *internal_error = NULL;
+ static GStaticMutex my_mutex = G_STATIC_MUTEX_INIT;
+
+ g_static_mutex_lock (&my_mutex);
data = g_simple_async_result_get_op_res_gpointer (result);
@@ -4166,6 +4169,9 @@ tracker_data_manager_init_thread (GSimpleAsyncResult *result,
}
data->result = result_b;
+
+ g_static_mutex_unlock (&my_mutex);
+
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]