diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-10 16:32:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-10 16:32:34 +0200 |
commit | 18a458e37b454e3d2cd475543d1a60887ddb2e97 (patch) | |
tree | 937c5041ffa2543ce9d1785f652ae6d3c694ebaf /libbuild2/scheduler.cxx | |
parent | 9d8ba565d1fd454369506a525997fceb5adae349 (diff) |
Fix bug scheduler::allocate/deallocate()
Diffstat (limited to 'libbuild2/scheduler.cxx')
-rw-r--r-- | libbuild2/scheduler.cxx | 4 |
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:: |