[gnome-builder] thread-pool: use non-exclusive threads
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] thread-pool: use non-exclusive threads
- Date: Fri, 30 Oct 2015 21:18:41 +0000 (UTC)
commit c187245e5b9244415bfb39e00b3e51598faaf7cd
Author: Christian Hergert <chergert redhat com>
Date: Fri Oct 30 12:47:34 2015 -0700
thread-pool: use non-exclusive threads
It's probably fine to share threads for our purposes here. Although, we
will still want to be able to tune this once we get IdeApplication so that
worker processes use a different value.
libide/ide-thread-pool.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libide/ide-thread-pool.c b/libide/ide-thread-pool.c
index 29a604c..d45c830 100644
--- a/libide/ide-thread-pool.c
+++ b/libide/ide-thread-pool.c
@@ -44,7 +44,7 @@ typedef struct
EGG_DEFINE_COUNTER (TotalTasks, "ThreadPool", "Total Tasks", "Total number of tasks processed.")
EGG_DEFINE_COUNTER (QueuedTasks, "ThreadPool", "Queued Tasks", "Current number of pending tasks.")
-static GThreadPool *threadPools [IDE_THREAD_POOL_LAST];
+static GThreadPool *thread_pools [IDE_THREAD_POOL_LAST];
enum {
TYPE_TASK,
@@ -54,7 +54,7 @@ enum {
static inline GThreadPool *
ide_thread_pool_get_pool (IdeThreadPoolKind kind)
{
- return threadPools [kind];
+ return thread_pools [kind];
}
/**
@@ -190,19 +190,19 @@ _ide_thread_pool_init (void)
* We don't want to consume threads fro other GTask's such as those regarding IO so we manage
* these work items exclusively.
*/
- threadPools [IDE_THREAD_POOL_COMPILER] = g_thread_pool_new (ide_thread_pool_worker,
+ thread_pools [IDE_THREAD_POOL_COMPILER] = g_thread_pool_new (ide_thread_pool_worker,
NULL,
COMPILER_MAX_THREADS,
- TRUE,
+ FALSE,
NULL);
/*
* Create our pool exclusive to things like indexing. Such examples including building of
* ctags indexes or highlight indexes.
*/
- threadPools [IDE_THREAD_POOL_INDEXER] = g_thread_pool_new (ide_thread_pool_worker,
+ thread_pools [IDE_THREAD_POOL_INDEXER] = g_thread_pool_new (ide_thread_pool_worker,
NULL,
INDEXER_MAX_THREADS,
- TRUE,
+ FALSE,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]