aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-08-10 16:32:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-08-10 16:32:34 +0200
commit18a458e37b454e3d2cd475543d1a60887ddb2e97 (patch)
tree937c5041ffa2543ce9d1785f652ae6d3c694ebaf
parent9d8ba565d1fd454369506a525997fceb5adae349 (diff)
Fix bug scheduler::allocate/deallocate()
-rw-r--r--libbuild2/scheduler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/scheduler.cxx b/libbuild2/scheduler.cxx
index 03842ec..deb5399 100644
--- a/libbuild2/scheduler.cxx
+++ b/libbuild2/scheduler.cxx
@@ -198,7 +198,7 @@ namespace build2
size_t d (max_active_ - active_);
if (n == 0 || d < n)
n = d;
- active_ -= n;
+ active_ += n;
return n;
}
else
@@ -212,7 +212,7 @@ namespace build2
return;
lock l (mutex_);
- active_ += n;
+ active_ -= n;
}
size_t scheduler::