[gimp] Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS



commit 00f0350413355e108f288d492165683a1072b0b4
Author: Sven Neumann <sven gimp org>
Date:   Sun May 16 22:26:11 2010 +0200

    Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS
    
    Clamp the default value for the number of processors to use to the
    maximum number of threads.

 app/config/gimpbaseconfig.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/config/gimpbaseconfig.c b/app/config/gimpbaseconfig.c
index 028d051..28a369f 100644
--- a/app/config/gimpbaseconfig.c
+++ b/app/config/gimpbaseconfig.c
@@ -99,6 +99,8 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
   num_processors = num_processors * 2;
 #endif
 
+  num_processors = MIN (num_processors, GIMP_MAX_NUM_THREADS);
+
   GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_NUM_PROCESSORS,
                                  "num-processors", NUM_PROCESSORS_BLURB,
                                  1, GIMP_MAX_NUM_THREADS, num_processors,



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