[tracker] plugins/evolution: Fixed a race condition, added a lock for it
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] plugins/evolution: Fixed a race condition, added a lock for it
- Date: Wed, 28 Apr 2010 09:37:43 +0000 (UTC)
commit 48b5e9b452016ce816eae424eb09f38e7bbc0511
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]