[tracker/rss-enclosures] plugins/evolution: Fixed a race condition, added a lock for it



commit 28420c1c2f7fb788e8b26193a9c61b812e0c98a5
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Apr 28 11:33:38 2010 +0200

    plugins/evolution: Fixed a race condition, added a lock for it

 src/plugins/evolution/tracker-evolution-plugin.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 5094889..e86cbdd 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -448,9 +448,11 @@ thread_pool_new (GFunc func, GFunc freeup, GCompareDataFunc sorter)
 static void
 thread_pool_push (ThreadPool *pool, gpointer item, gpointer user_data)
 {
+	g_mutex_lock (pool->mutex);
 	pool->items = g_list_prepend (pool->items, item);
 	if (!pool->dying)
 		g_thread_pool_push (pool->pool, item, user_data);
+	g_mutex_unlock (pool->mutex);
 }
 
 static gpointer



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