[GRASS-SVN] r66731 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 3 18:25:57 PST 2015
Author: glynn
Date: 2015-11-03 18:25:57 -0800 (Tue, 03 Nov 2015)
New Revision: 66731
Modified:
grass/trunk/lib/gis/worker.c
Log:
Set default workers to zero (threads only used by explicit request)
Modified: grass/trunk/lib/gis/worker.c
===================================================================
--- grass/trunk/lib/gis/worker.c 2015-11-03 20:56:04 UTC (rev 66730)
+++ grass/trunk/lib/gis/worker.c 2015-11-04 02:25:57 UTC (rev 66731)
@@ -22,7 +22,7 @@
#include <pthread.h>
-#define DEFAULT_WORKERS 8
+#define DEFAULT_WORKERS 0
struct worker {
void (*func)(void *);
@@ -85,7 +85,7 @@
pthread_mutex_lock(&worker_mutex);
- while (w = get_worker(), force && !w)
+ while (w = get_worker(), force && num_workers > 0 && !w)
pthread_cond_wait(&worker_cond, &worker_mutex);
*ref = w;
More information about the grass-commit
mailing list