[gnome-builder] thread-pool: add pool for indexers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] thread-pool: add pool for indexers
- Date: Sun, 17 May 2015 03:15:25 +0000 (UTC)
commit 96480a777f5ca3dcec6b52b7fd047ae3bacb46cb
Author: Christian Hergert <christian hergert me>
Date: Sat May 16 20:11:25 2015 -0700
thread-pool: add pool for indexers
libide/ide-thread-pool.c | 11 +++++++++++
libide/ide-thread-pool.h | 1 +
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-thread-pool.c b/libide/ide-thread-pool.c
index bd7523a..3d75211 100644
--- a/libide/ide-thread-pool.c
+++ b/libide/ide-thread-pool.c
@@ -24,6 +24,7 @@
#include "ide-thread-pool.h"
#define COMPILER_MAX_THREADS 4
+#define INDEXER_MAX_THREADS 1
typedef struct
{
@@ -125,4 +126,14 @@ _ide_thread_pool_init (void)
COMPILER_MAX_THREADS,
TRUE,
NULL);
+
+ /*
+ * Create our pool exclusive to things like indexing. Such examples including building of
+ * ctags indexes or highlight indexes.
+ */
+ gThreadPools [IDE_THREAD_POOL_INDEXER] = g_thread_pool_new (ide_thread_pool_worker,
+ NULL,
+ INDEXER_MAX_THREADS,
+ TRUE,
+ NULL);
}
diff --git a/libide/ide-thread-pool.h b/libide/ide-thread-pool.h
index 9056ab7..e34ef52 100644
--- a/libide/ide-thread-pool.h
+++ b/libide/ide-thread-pool.h
@@ -26,6 +26,7 @@ G_BEGIN_DECLS
typedef enum
{
IDE_THREAD_POOL_COMPILER,
+ IDE_THREAD_POOL_INDEXER,
IDE_THREAD_POOL_LAST
} IdeThreadPoolKind;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]