[gegl] gegl: limit default _gegl_threads to GEGL_MAX_THREADS
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: limit default _gegl_threads to GEGL_MAX_THREADS
- Date: Tue, 22 May 2018 10:10:03 +0000 (UTC)
commit d305ddb1e8a75f346c0515542c937fd3699ecef1
Author: Øyvind Kolås <pippin gimp org>
Date: Tue May 22 12:06:53 2018 +0200
gegl: limit default _gegl_threads to GEGL_MAX_THREADS
On systems with many cores this limit already triggers, as in
bug #796289.
gegl/gegl-config.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gegl/gegl-config.c b/gegl/gegl-config.c
index c25ee64..9f8f964 100644
--- a/gegl/gegl-config.c
+++ b/gegl/gegl-config.c
@@ -225,7 +225,8 @@ gegl_config_class_init (GeglConfigClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
- _gegl_threads = g_get_num_processors ();
+ _gegl_threads = MAX (GEGL_MAX_THREADS, g_get_num_processors ());
+
g_object_class_install_property (gobject_class, PROP_THREADS,
g_param_spec_int ("threads",
"Number of threads",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]