[GRASS-SVN] r67398 - grass/branches/releasebranch_7_0/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 27 12:12:11 PST 2015
Author: neteler
Date: 2015-12-27 12:12:11 -0800 (Sun, 27 Dec 2015)
New Revision: 67398
Modified:
grass/branches/releasebranch_7_0/lib/gis/worker.c
Log:
libgis/r.mapcalc: Set default workers to zero (threads only used by explicit request) (trunk, r66731)
Modified: grass/branches/releasebranch_7_0/lib/gis/worker.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/worker.c 2015-12-27 18:29:24 UTC (rev 67397)
+++ grass/branches/releasebranch_7_0/lib/gis/worker.c 2015-12-27 20:12:11 UTC (rev 67398)
@@ -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