build: enable nothreads workaround only with WAF_NOTHREADS=1
[samba.git] / buildtools / wafsamba / nothreads.py
index a7cfa7302e3fe09f57fa5dabc65bd350a585a353..9054a57af5b91fd0bc50c9ab986834f9dee1d915 100644 (file)
@@ -199,6 +199,7 @@ class Parallel(object):
                                # run me: put the task in ready queue
                                tsk.position = (self.processed, self.total)
                                self.count += 1
                                # run me: put the task in ready queue
                                tsk.position = (self.processed, self.total)
                                self.count += 1
+                               self.processed += 1
                                tsk.master = self
 
                                process(tsk)
                                tsk.master = self
 
                                process(tsk)
@@ -212,8 +213,7 @@ class Parallel(object):
                assert (self.count == 0 or self.stop)
 
 
                assert (self.count == 0 or self.stop)
 
 
-# enable nothreads if -j1 is used from the makefile
-if os.environ.get('JOBS') == '1':
-       import Runner
-       Runner.process = process
-       Runner.Parallel = Parallel
+# enable nothreads
+import Runner
+Runner.process = process
+Runner.Parallel = Parallel