Changeset: 8a54beb63708 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8a54beb63708
Modified Files:
        monetdb5/mal/mal_profiler.c
Branch: holindex
Log Message:

Make sure the number of threads activated in thread pool is positive.


diffs (17 lines):

diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -1373,10 +1373,11 @@ void HeartbeatCPUload(void *arg)
                while(1){
                        (void) getCPULoad(cpuload);
                        load = corestat[256].load;
-                       if ( load >= 0 && load <= 100.0 && load < threshold){
+                       if ( load >= 0 && load <= 100.0 && load <= threshold){
                                N = (int) (load * max_threads) / 100.0;
                                n = max_threads - N;
-                               MRschedule(n, NULL, IdleFunc);
+                               if(n>0)
+                                       MRschedule(n, NULL, IdleFunc);
                                (void) getCPULoad(cpuload);
                                MT_sleep_ms(1000);
                        }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to