[gimp/gimp-2-6] Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-6] Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS
- Date: Tue, 7 Oct 2014 14:02:32 +0000 (UTC)
commit 000f73cc27efe469cb9a43400db0a23bb11efb33
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.
(cherry picked from commit 00f0350413355e108f288d492165683a1072b0b4)
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 655b976..b6b21fa 100644
--- a/app/config/gimpbaseconfig.c
+++ b/app/config/gimpbaseconfig.c
@@ -100,6 +100,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]