[gnome-builder] code-index: better mutex naming



commit be8c62f50e99f6e69d90d6dd1161731e0100a437
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 17 02:38:51 2018 -0800

    code-index: better mutex naming

 src/plugins/code-index/ide-code-index-builder.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/code-index/ide-code-index-builder.c b/src/plugins/code-index/ide-code-index-builder.c
index 3d98df321..c9d3b6f2d 100644
--- a/src/plugins/code-index/ide-code-index-builder.c
+++ b/src/plugins/code-index/ide-code-index-builder.c
@@ -28,11 +28,10 @@ struct _IdeCodeIndexBuilder
 {
   IdeObject            parent;
 
+  GMutex               mutex;
   IdeCodeIndexIndex   *index;
   IdeCodeIndexService *service;
 
-  GMutex               indexed;
-
   GHashTable          *build_flags;
 };
 
@@ -320,7 +319,7 @@ ide_code_index_builder_index_directory_cb (GObject      *object,
   g_assert (IDE_IS_CODE_INDEX_BUILDER (self));
   g_assert (G_IS_TASK (task));
 
-  g_mutex_lock (&self->indexed);
+  g_mutex_lock (&self->mutex);
 
   n_threads = GPOINTER_TO_UINT (g_task_get_task_data (task)) - 1;
 
@@ -329,7 +328,7 @@ ide_code_index_builder_index_directory_cb (GObject      *object,
   else
     g_task_return_boolean (task, TRUE);
 
-  g_mutex_unlock (&self->indexed);
+  g_mutex_unlock (&self->mutex);
 }
 
 static void
@@ -761,7 +760,7 @@ ide_code_index_builder_finalize (GObject *object)
   g_clear_object (&self->index);
   g_clear_object (&self->service);
   g_clear_pointer (&self->build_flags, g_hash_table_unref);
-  g_mutex_clear (&self->indexed);
+  g_mutex_clear (&self->mutex);
 
   G_OBJECT_CLASS(ide_code_index_builder_parent_class)->finalize (object);
 }
@@ -819,7 +818,7 @@ ide_code_index_builder_init (IdeCodeIndexBuilder *self)
                                              (GEqualFunc)ide_file_equal,
                                              g_object_unref,
                                              (GDestroyNotify)g_strfreev);
-  g_mutex_init (&self->indexed);
+  g_mutex_init (&self->mutex);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]